gametechmods

Robot Arena => General Support => Topic started by: WhamettNuht on September 02, 2009, 05:21:39 PM

Title: Guides on making/editing tactics?
Post by: WhamettNuht on September 02, 2009, 05:21:39 PM
Hey All
I was wondering if there was any guides on making and editng ai tactics?
I knew there was one, but i cant find it.
Thanks
Wham
Title: Guides on making/editing tactics?
Post by: roboman2444 on September 02, 2009, 05:26:52 PM
i know there is a .pdf that i think philetbabe made but i cant find it either.
Title: Guides on making/editing tactics?
Post by: philetbabe on September 03, 2009, 02:53:25 AM
i don't think i have ever write much on this subject.
briefly, if you want to write a tactic, you have to create a class with 3 functions :
_init_ : declare class variable
Evaluate: gives back a number which help to choose between tactics : the higher the number, the more chance this tactic is choosen. in fact a bot may have many (all?) tactics, each time it has to do something (probably on each tick) the evaluate function is called for each bot's tactic, the best one is keept.
Execute : What to currently do if this tactic is choosen.


- The tactic may be define in the file tactics.py or inside your own AI.

see the file tactics.py to learn more about .

typically, a useful tactic  should be one which evalutes its  current win-point  and the one of the other bots, and if it wins with more than 1000 pt, it tries  to avoid combat
Title: Guides on making/editing tactics?
Post by: Madiaba on September 03, 2009, 06:42:00 AM
Hey there stranger.  Thanks for the help/input.
Wham it might help if you were more specific about what you're trying to do...
Title: Guides on making/editing tactics?
Post by: WhamettNuht on September 03, 2009, 08:13:50 AM
Well, basically, the title says it.
I want to know how to make and edit tactics, so that if i i dont have to stay to the normal ones, but i can then allow more interesting designs to take an appearence on Wild Robots for example.
Plus i'd like to know how to edit them, say telling the frenzy.py to put the axe back at all times when not in use, ect.
Title: Guides on making/editing tactics?
Post by: philetbabe on September 03, 2009, 08:24:04 AM
Tactic mostly deals with bot movement : go forward, turn , go back etc.
AI (like frenzy, whipper, spinner etc) deals more with weapon and motor .

I think your need is more how to  write AI than how to write tactics. Typically, you calculate the distance between your bot and its nearest ennemy. if the distance is over a certain amount, you act the way you want.

About AI, yet there is this tutorial :
Quote from: philetbabe;44801
here is a new version of the  AI chart  ..
Title: Guides on making/editing tactics?
Post by: roboman2444 on September 03, 2009, 02:11:02 PM
there it is!