Jump to content

Testing Bots


Recommended Posts

Since 0 A.D. is fully deterministic it allows clever testing, you can be sure on map m entity e has always id n. So I made a tester module which works with this data structure:

  '1': [() => "Running Tester with: " + sequence],  '2': [H.Groups.launch.bind(null, "g.grainpicker", 44), "launching group grainpicker #1"],   '3': [H.Groups.launch.bind(null, "g.grainpicker", 44), "launching group grainpicker #2"],  '22': [destroy.bind(null, 216), "destroying field"],  '28': [destroy.bind(null, 221), "destroying female unit"],  '29': [destroy.bind(null, 222), "destroying female unit"],

At left hand ticks time right hand expressions are evaluated and a string produces a chat message. Functions destroy and chat fire engine postcommands.. The video shows how a grain-picker group responds to destroying their field and two units.

Edit: words

Edited by agentx
Link to comment
Share on other sites

Even more concise:

  '1': [() => "< - START: " + sequence + " - >"],  '2': [T.launch("g.grainpicker", 44, 44), "launching 2 grainpickers"],  '10': [() => "please wait a moment"], '22': [T.destroy(216), "destroying field"], '30': [T.destroy(223, 224, 225), "destroying female units"], '44': [() => "ACTION"], '50': [T.launch("g.grainpicker", 44, 44, 44, 44, 44), "launching 5 grainpickers"], '210': [() => "< - FINIS: " + sequence + " - >"],

The groups have a slightly different behaviour now, they first order one unit and the remaining four together with the field.

  • Like 2
Link to comment
Share on other sites

I ran this sequence:

        '1': [() => "< - START: " + sequence + " - >"],        '5': [T.launch("g.grainpicker", 44, 44, 44, 44, 44), "launching 5 grainpickers"],       '241': [() => "< - FINIS: " + sequence + " - >"],

and got this chart:

five-grainpicker-food-log.png

Food started with 10,000, lowest was 8850. Launched at 12s the grain pickers were back to 10,000 at 282s and reached 11,000 at 386s. That makes roughly 200 food in 100 secs per grain picker for Athen without any technologies. The video is rather boring.

Edit: words

Edited by agentx
  • Like 1
Link to comment
Share on other sites

> group-self-conciousness

That's too high of a target. They won't start a rebellion. I like group-self-sustainability. The grainpickers are responsible for their health and food output. To do this I give them the ability to adequately respond to field, unit, dropsite and center loss and to attacks. Other groups will be hunter, miner, logger, builder, healer and scouts. The economy is responsible to launch the right group mix depending on the map and overall output target. And on top a planner turning military requests in economic outcome or the other way round.

  • Like 1
Link to comment
Share on other sites

That's true. It might be a bit high. Yet this is what I expect of my Hybrid AI which should finally give the units the experience and knowledge to start something just by combining events from history.

I even like to call it Hybrid Hannibal AI as what you develops looks like a promising base for the commanders' self-/history-awareness.

Edited by Hephaestion
Link to comment
Share on other sites

Well, actually the idea is everybody feeling fancy enough forks Hannibal, spends groups a different behaviour and calls it a bot, remember - tournaments! Of course, there will be a super mega combat model with SimConomy 3.7 + GladiatorFix 7.9 trained by agentxTM.

:medieval:

Edited by agentx
Link to comment
Share on other sites

I'm looking forward to how you deal with my long-bearded commanders - having fought seventyseven battles on all seven seas, the navy commander will surpass you sea blockades, the commander of forest troops will pose capture your troops without opposition, and the longest-bearded mushroom-loving commander in chief will fight in first row with his troops to raise moral against your invincible gladiators. Wait too long and their wisdom will exchange our losses for yours. (though I still hope they can end the war without any losses on either side :ph34r:
)

oldman.gif:gandalf_w:old-01.gif

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...