Author Topic: Learning to AI  (Read 1595 times)

Offline MassimoV

  • I Move Weight
  • *
  • Posts: 8929
  • Rep: 25
  • I make rap for people of Serbia
    • MassimoVTV
  • Awards BOTM Winner
    • View Profile
    • Mourning Glory
    • Awards
  • See profile for gamer tags: Yes
  • Skype: myhandsarefood
Learning to AI
« 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?:


Second: What is the Bindings PYC file and do I need toedit it?

Offline Enigm@

  • convicted sex offender
  • *
  • Posts: 6616
  • Rep: 5
  • :really_makes_you_think:
    • http://www.youtube.com/us
    • View Profile
    • Awards
  • Skype: uncle_slamm
Re: Learning to AI
« Reply #1 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)
(◕‿◕✿) discord: uncle_slamm steam: bigmommaprodz #unbanlra2

Offline MassimoV

  • I Move Weight
  • *
  • Posts: 8929
  • Rep: 25
  • I make rap for people of Serbia
    • MassimoVTV
  • Awards BOTM Winner
    • View Profile
    • Mourning Glory
    • Awards
  • See profile for gamer tags: Yes
  • Skype: myhandsarefood
Re: Learning to AI
« Reply #2 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.

Offline Enigm@

  • convicted sex offender
  • *
  • Posts: 6616
  • Rep: 5
  • :really_makes_you_think:
    • http://www.youtube.com/us
    • View Profile
    • Awards
  • Skype: uncle_slamm
Re: Learning to AI
« Reply #3 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
(◕‿◕✿) discord: uncle_slamm steam: bigmommaprodz #unbanlra2

Offline MassimoV

  • I Move Weight
  • *
  • Posts: 8929
  • Rep: 25
  • I make rap for people of Serbia
    • MassimoVTV
  • Awards BOTM Winner
    • View Profile
    • Mourning Glory
    • Awards
  • See profile for gamer tags: Yes
  • Skype: myhandsarefood
Re: Learning to AI
« Reply #4 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)}))

Offline Clickbeetle

  • *
  • Posts: 3375
  • Rep: 21
  • In Soviet Russia, bugs stomp YOU!
  • Awards BOTM Winner
    • View Profile
    • Beetle Bros site
    • Awards
Re: Learning to AI
« Reply #5 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
 
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.

To lack feeling is to be dead, but to act on every feeling is to be a child.
-Brandon Sanderson, The Way of Kings

Offline RpJk

  • ♫Time has come to listen to the crying of their puppet souls♫
  • Ultra Heavyweight
  • Posts: 1975
  • Rep: -1
  • Done and done.
    • View Profile
    • Awards
Re: Learning to AI
« Reply #6 on: September 05, 2011, 01:21:41 AM »
What is the easiest way to AI?
Old Stock Showcase: https://gametechmods.com/forums/index.php?topic=6590.0

I've moved to other forums. Under a different name. This is where it all began.

Offline Enigm@

  • convicted sex offender
  • *
  • Posts: 6616
  • Rep: 5
  • :really_makes_you_think:
    • http://www.youtube.com/us
    • View Profile
    • Awards
  • Skype: uncle_slamm
Re: Learning to AI
« Reply #7 on: September 05, 2011, 01:23:19 AM »
copying bindings similar to your bot..
(◕‿◕✿) discord: uncle_slamm steam: bigmommaprodz #unbanlra2

Offline Squirrel_Monkey

  • Squirrel_Monkeyweight
  • *
  • Posts: 7587
  • Rep: 7
  • [Insert clever and witty comment here]
    • 0SquirrelMonkey0
    • View Profile
    • Awards
Re: Learning to AI
« Reply #8 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.)
Better than GK since 2009.
I think SM is a pretty cool guy, eh builds unicycle-bots and doesn't afraid of anything

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: Learning to AI
« Reply #9 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...
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline MassimoV

  • I Move Weight
  • *
  • Posts: 8929
  • Rep: 25
  • I make rap for people of Serbia
    • MassimoVTV
  • Awards BOTM Winner
    • View Profile
    • Mourning Glory
    • Awards
  • See profile for gamer tags: Yes
  • Skype: myhandsarefood
Re: Learning to AI
« Reply #10 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.

Offline MassimoV

  • I Move Weight
  • *
  • Posts: 8929
  • Rep: 25
  • I make rap for people of Serbia
    • MassimoVTV
  • Awards BOTM Winner
    • View Profile
    • Mourning Glory
    • Awards
  • See profile for gamer tags: Yes
  • Skype: myhandsarefood
Re: Learning to AI
« Reply #11 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.

Offline Clickbeetle

  • *
  • Posts: 3375
  • Rep: 21
  • In Soviet Russia, bugs stomp YOU!
  • Awards BOTM Winner
    • View Profile
    • Beetle Bros site
    • Awards
Re: Learning to AI
« Reply #12 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.

To lack feeling is to be dead, but to act on every feeling is to be a child.
-Brandon Sanderson, The Way of Kings