opendilab / GoBigger

[ICLR 2023] Come & try Decision-Intelligence version of "Agar"! Gobigger could also help you with multi-agent decision intelligence study.
https://gobigger.readthedocs.io/en/latest/
Apache License 2.0
457 stars 34 forks source link

add custom init for server #1

Closed mingzhang96 closed 2 years ago

mingzhang96 commented 2 years ago

Users are able to customize the initialized observation in the matches. Just add custom_init in the config:

server = server(dict(
            version='0.1',
            team_num=4, 
            player_num_per_team=3, 
            map_width=1000,
            map_height=1000, 
            ...
            custom_init=dict(
                food=[{'position': [100, 100], 'radius': 2}],
                thorns=[{'position': [200, 200], 'radius': 15}],
                spore=[{'position': [300, 300], 'radius': 3}],
                clone=[{'position': [400, 400], 'radius': 12, 'player': '0', 'team': '0'}],
            ),
         ))

custom_init is the same as overlap in observation space. If food or thorns or spore or clone is [], it will be initialized randomly.