gametechmods

Robot Arena => General Support => Topic started by: MassimoV on September 04, 2011, 07:53:45 PM

Title: Learning to AI
Post by: MassimoV on September 04, 2011, 07:53:45 PM
Hey I'm learning to AI but I need help.

First: I'm not sure how the weapons section in the bindings work. I saw them in the AI chart but i still don't understand. For example what I put in for weapons for this bot?:
(https://gametechmods.com/uploads/images/60452Oarfish.JPG)

Second: What is the Bindings PYC file and do I need toedit it?
Title: Re: Learning to AI
Post by: Enigm@ on September 04, 2011, 08:04:51 PM
ok, for a hammer bot, you're gonna need to put a smart zone where the hammer will. and the the smart zone "weapon" (no caps)
Title: Re: Learning to AI
Post by: MassimoV on September 04, 2011, 08:08:01 PM
I know all of that except for those 2 questions about the weapons catagorie in the bindings and the bindings PYC file.
Title: Re: Learning to AI
Post by: Enigm@ on September 04, 2011, 08:09:35 PM
I know all of that except for those 2 questions about the weapons catagorie in the bindings and the bindings PYC file.
it should be chopper. (as in its weapon category) don't know bout number two tho
Title: Re: Learning to AI
Post by: MassimoV on September 04, 2011, 08:28:28 PM
I'm not talking different pythons, I'm talking about the numbers you place after the 'weapons' area here(In the last part.)


Code: [Select]
    list.append(("Yus","Omni",{'nose':math.pi,'radius':1,'topspeed':99,'throttle':130,'turn':60,'turnspeed':1,'weapons':(24,25,26,27,28,29,32,33,34,35,36,37)}))
Title: Re: Learning to AI
Post by: Clickbeetle on September 05, 2011, 01:19:15 AM
The weapons line is used if you want your bot to switch to rammer tactics after certain components break (usually weapons).  It also appends a tactic called "Shove" which aims to push opponents into hazards.
 
In order to get the ID's of your weapons you need apanx's exporter:
https://gametechmods.com/Robot_Arena2/Tools/apanx_bot_exporter.zip (https://gametechmods.com/Robot_Arena2/Tools/apanx_bot_exporter.zip)
 
Just put whatever ID's you want into 'weapons' and when those break the bot will change tactics.
 
Bindings.pyc is a compressed file that is created automatically whenever you modify Bindings.py.  You don't need to do anything with it.
Title: Re: Learning to AI
Post by: RpJk on September 05, 2011, 01:21:41 AM
What is the easiest way to AI?
Title: Re: Learning to AI
Post by: Enigm@ on September 05, 2011, 01:23:19 AM
copying bindings similar to your bot..
Title: Re: Learning to AI
Post by: Squirrel_Monkey on September 05, 2011, 02:56:27 AM
Or speak to me. I run live teaching sessions. (Well, I taught a few guys over messenger.)
Title: Re: Learning to AI
Post by: G.K. on September 05, 2011, 03:12:46 AM
Or speak to me. I run live teaching sessions. (Well, I taught a few guys over messenger.)

And 1 guy actually in your house...
Title: Re: Learning to AI
Post by: MassimoV on September 05, 2011, 11:17:14 AM
Thanks Click. So I don't need the weapons line untill I get better at AI'ing. Thanks.
Title: Re: Learning to AI
Post by: MassimoV on September 05, 2011, 01:08:02 PM
Thanks everybody. I AI'ed some bots great but I need your help with this flipper. It only moves forwards and when a robot gets in the smartzone, it stops moving.
Title: Re: Learning to AI
Post by: Clickbeetle on September 11, 2011, 06:22:06 PM
There was code in the stock __init__.py that tells the AI to stop moving when the opponent is inside its radius... but I got rid of it a long time ago and don't remember what it looked like.  That may be your problem.  Just copy __init__.py from any of my mods like BBEANS or DSL2 and it should do the trick.
 
Other than that, the AI will always stop moving when the opponent is right on top of it, because it doesn't know which way to go.
 
As for not turning, check that your turn control is named "LeftRight" (case sensitive, no spaces) and that your motors are wired correctly.
 
Edit: Nevermind the radius code is in Tactics, not __init__.  Just get a new Tactics.py from somewhere and you should be good.