Jump to content

Simulation test with bots


sanderd17
 Share

Recommended Posts

Is it possible to watch a game of bots against each other?

I'm thinking about the map creator, there you can do a simulation, but the players don't move. It would be nice if we can make bots play against each other, so we can test if the map is in balance (if there are enough resources on both sides, if crossing the mountains isn't too hard for one side etc).

It would be nice if I could create unequal maps with equal chances (like one player has all metal resources, while the other has all stone resources). But it's hard to test the equal chances if you can't let it play by bots.

0AD is a great game btw. Thanks for your work.

Link to comment
Share on other sites

Yeah, this is something I've wondered about as well. What I did was put one unit of player 3 on the map, make it unreachable for the AI (in the middle of the water xD) then load the map, make myself player 3 and both player 1 and 2 Aegis bots. Then open developer menu, set reveal map and watch the two AI battle ... however, this does not reflect well whether the map is balanced since the AI does 1) not use water, 2) doesn't have really much tactics and probably points 3, 4, 5 and so on as well, even though I don't know what they are xD

But it is nice to watch the two bots fight each other :-)

There must be a better way to do this, but I don't know it.

Link to comment
Share on other sites

Is it possible to watch a game of bots against each other?

I'm thinking about the map creator, there you can do a simulation, but the players don't move. It would be nice if we can make bots play against each other, so we can test if the map is in balance (if there are enough resources on both sides, if crossing the mountains isn't too hard for one side etc).

It would be nice if I could create unequal maps with equal chances (like one player has all metal resources, while the other has all stone resources). But it's hard to test the equal chances if you can't let it play by bots.

0AD is a great game btw. Thanks for your work.

Perhaps the ability to set all players to bots in singleplayer (currently, if you set all players to bots, it will kick you to the next player).
Link to comment
Share on other sites

Yes you can do something like that:

./pyrogenesis -quickstart -autostart="Oasis" -autostart-ai=1:qbot -autostart-ai=2:qbot

Check: http://trac.wildfire...stem/readme.txt

However as far as I know you won't be able to watch the game in this case.

Well, the UI does start with this, but I get the following errors:


[sander@ArchingFar ~]$ 0ad -quickstart -autostart="Gold_Rush" -autostart-ai=1:qbot -autostart-ai=2:qbot -autostart-ai=3:qbot -autostart-ai=4:qbot
Cache: 200 (total: 2832) MiB
TIMER| InitVfs: 448.408 us
Sound: AlcInit success, using OpenAL Soft
TIMER| InitScripting: 6.62087 ms
TIMER| CONFIG_Init: 130.766 ms
ATTENTION: default value of option force_s3tc_enable overridden by environment.
TIMER| RunHardwareDetection: 28.1899 ms
TIMER| InitRenderer: 2.16348 ms
GAME STARTED, ALL INIT COMPLETE
TIMER| ps_console: 2.59458 ms
TIMER| ps_lang_hotkeys: 911.876 us
TIMER| common/setup.xml: 1.1542 ms
TIMER| common/styles.xml: 64.895 us
TIMER| common/sprite1.xml: 2.48124 ms
TIMER| common/icon_sprites.xml: 118.493 us
TIMER| common/common_sprites.xml: 2.84009 ms
TIMER| common/common_styles.xml: 341.498 us
TIMER| session/sprites.xml: 3.8518 ms
TIMER| session/setup.xml: 96.43 us
TIMER| session/styles.xml: 298.386 us
TIMER| session/session.xml: 107.577 ms
TIMER| common/global.xml: 1.62091 ms
WARNING: JavaScript warning: gui/session/session.js line 446
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 447
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 448
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 449
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 446
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 447
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 448
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 449
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
Using Xcursor to sys_cursor_create 32 x 32 cursor
WARNING: JavaScript warning: gui/session/session.js line 446
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 447
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 448
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 449
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 446
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 447
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 448
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 449
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 446
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 447
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 448
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 449
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 446
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 447
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 448
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 449
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 446
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 447
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 448
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 449
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 446
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 447
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 448
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: JavaScript warning: gui/session/session.js line 449
Script value conversion check failed: JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v) (got type undefined)
WARNING: QueueManager received bad priorities, please report this error: ({house:500, citizenSoldier:1, villager:100, economicBuilding:30, field:20, advancedSoldier:NaN, siege:10, militaryBuilding:50, defenceBuilding:17, civilCentre:1000})
WARNING: QueueManager received bad priorities, please report this error: ({house:500, citizenSoldier:1, villager:100, economicBuilding:30, field:20, advancedSoldier:1, siege:10, militaryBuilding:50, defenceBuilding:17, civilCentre:1000})

I got this with my own map, so I tried it with one of the default maps, and it's the same.

Setting another, unreachable, player on the map is clever though. I'll try that once.

Edited by sanderd17
Link to comment
Share on other sites

I saw this problem just before we released Alpha 12 but didn't consider it significant enough to risk changing things for. The game will still work fine, you can just ignore the error messages. Also you can use F9 and then type Engine.SetSimRate(5) to set the game speed to be 5 times faster.

Edit: The last error is interesting, I am guessing this only happens on your map? Could you upload the map somewhere since this is a new AI bug.

Link to comment
Share on other sites

It always happens on Laconia in turn 239 (-quickstart -autostart="Laconia 01" -autostart-ai=1:qbot-wc -autostart-ai=2:qbot-wc)

You can set a conditional breakpoint for the condition "n == 239" on line 85 of Replay.cpp.

I've lost the trace at a call to JS_CallFunctionName with the function name "HandleMessage" for player 2.

Now I'm searching for a way to debug JS code properly (like singlestepping and such).

Link to comment
Share on other sites

Edit: The last error is interesting, I am guessing this only happens on your map? Could you upload the map somewhere since this is a new AI bug.

It happened with my map, so I tried one of the default maps (you may notice I call "Gold Rush" in my command), and it still happens.

I'm on Arch, the default binary packages of the distribution. On a 32-bit system.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...