GoBigger environment
Overview
This section mainly explains the environment design of GoBigger, including the definition of a given environment, and how to customize the corresponding environment.
Defined environment
GoBigger defines some basic environments, which can be generated by the following code
from gobigger.envs import create_env
env = create_env('st_t4p3')
Among them, the first parameter received by create_env()
is a string, which is the name of the environment we have defined. Similarly, in addition to st_t4p3
, we also have st_t2p2
, st_t3p2
to choose from. The differences between each environment are described in detail below.
st_t4p3
: Created a game scene with four teams of three players each. This is the standard game scene we define, and parameters including the refresh speed of various balls in it have been adjusted to a relatively robust level. Users can use this environment to solve some cooperative and confrontational problems in complex spatial scenarios.st_t2p2
: Considering thatst_t4p3
may be too large, we provide a smaller game scene. In this scenario, there are only two teams, and each team has two players. Also, the map size, the number of food orbs and thorn balls have been reduced accordingly. In addition, in order to reduce the player’s early development time, we set the player’s first birth score to 13000 inst_t2p2
to allow players to fight quickly, while this value is 1000 inst_t4p3
.st_t3p2
: This is a medium environment betweenst_t2p2
andst_t4p3
, with three teams of two players each. Likest_t2p2
, a higher birth score is also set to reduce development time.
In addition, the above environment defaults to an action every two frames (20 frames per second). If you want a longer action interval, you can set it with the following code:
from gobigger.envs import create_env
env = create_env('st_t4p3', step_mul=10)
In addition, we have more environments already defined, as follows:
Name |
Agents Size |
Map Size |
Food |
Thorn |
Init Size |
Limited Frame |
---|---|---|---|---|---|---|
Small Maps |
||||||
st_t1p1 |
1x1 |
32x32 |
[65,75] |
[1,2] |
1000 |
3600(3min) |
st_t1p2 |
1x2 |
48x48 |
[130,150] |
[2,3] |
1000 |
3600(3min) |
st_t2p1 |
2x1 |
48x48 |
[130,150] |
[2,3] |
1000 |
3600(3min) |
st_t2p2 |
2x2 |
64x64 |
[260,300] |
[3,4] |
13000 |
3600(3min) |
st_t3p2 |
3x2 |
88x88 |
[500,560] |
[5,6] |
13000 |
3600(3min) |
Large Maps |
||||||
st_t4p3 |
4x3 |
128x128 |
[800,900] |
[9,12] |
1000 |
14400(12min) |
st_t5p3 |
5x3 |
128x128 |
[900,1000] |
[10,12] |
1000 |
14400(12min) |
st_t5p4 |
5x4 |
144x144 |
[900,1000] |
[10,12] |
1000 |
14400(12min) |
st_t6p4 |
6x4 |
144x144 |
[1000,1100] |
[11,13] |
1000 |
14400(12min) |
Customize the corresponding environment
GoBigger’s rich configuration file design allows users to easily set up every detail in the game.
If you want to make a simple modification on the basis of an environment we have defined, for example, modify the duration of a round in st_t2p2
, you can do the following:
from gobigger.envs import create_env
env = create_env('st_t2p2', dict(
frame_limit=10*60*20,
))
In this way, the new environment opened will become a 10-minute round based on st_t2p2
.