Author Topic: AIing - Almost There!  (Read 4937 times)

Offline JoeBlo

Re: AIing - Almost There!
« Reply #20 on: July 11, 2010, 03:56:35 AM »
why are you wanting to use Flipper.py on a pop up ?

Offline Vertigo

  • *
  • Posts: 4547
  • Rep: 5
    • View Profile
    • Awards
Re: AIing - Almost There!
« Reply #21 on: July 11, 2010, 03:59:21 AM »
I don't know really, but slashback has it & is also a true popup

Offline JoeBlo

Re: AIing - Almost There!
« Reply #22 on: July 11, 2010, 04:02:51 AM »
if the robot is inverted Flipper will leave the robot alone

for a pop up you want it to keep on the kill, popup.py would be the best choice but its a little advanced for (assuming) a newbie to AI so I will do it with Omni since its easy to understand how everything works first

Offline Vertigo

  • *
  • Posts: 4547
  • Rep: 5
    • View Profile
    • Awards
Re: AIing - Almost There!
« Reply #23 on: July 11, 2010, 04:11:00 AM »
Fine

Offline JoeBlo

Re: AIing - Almost There!
« Reply #24 on: July 11, 2010, 04:15:01 AM »
Im offering to take you through AI... if you dont want me to tell me now

Offline Vertigo

  • *
  • Posts: 4547
  • Rep: 5
    • View Profile
    • Awards
Re: AIing - Almost There!
« Reply #25 on: July 11, 2010, 04:17:10 AM »
OK, accepted

Offline JoeBlo

Re: AIing - Almost There!
« Reply #26 on: July 11, 2010, 04:22:03 AM »
ok this line will work (I have tested it) if not this forum does like to break things sometimes

Code: [Select]
list.append(("True Inertia 3","Omni",{'nose':math.pi*2,'radius':0.1,'topspeed':120,'throttle':100,'turn':60,'turnspeed':2.5,'weapons':(1,)}))
Controls

Forward
LeftRight
Fire

Smartzone

weapon

-------------------------

easy stuff, make sure there is no additional spaces after the words or anything

Offline Vertigo

  • *
  • Posts: 4547
  • Rep: 5
    • View Profile
    • Awards
Re: AIing - Almost There!
« Reply #27 on: July 11, 2010, 04:27:02 AM »
That crashes my game

Offline JoeBlo

Re: AIing - Almost There!
« Reply #28 on: July 11, 2010, 04:31:56 AM »
either its become broken in the copy and paste sequence or you haven't implemented it correctly as I had it running 2 mins ago in my game

I will send you a text file

----------------------------------------------------------------

thats basic fire when opponent is in the zone stuff

for a srimech make another button called Srimech

----------------------------------------------------------------

for the more advanced PopUp.py (from BBEANS AI) the robot will fish out the chassis first

it does this with the addition of this value

'NoChassisTime':3,

when a robot is in the Smartzone it will only fire when a chassis is in the zone, ignoring other components but after 3 tick intervals (lets just say seconds to be simple) if no chassis has been found and the robot is in the Smartzone it will fire anyway.

so

Code: [Select]
list.append(("True Inertia 3","Popup",{'NoChassisTime':3,'nose':math.pi*2,'radius':0.1,'topspeed':120,'throttle':100,'turn':60,'turnspeed':2.5,'weapons':(1,)}))
Popup.py was based off Omni originally so it uses the same controls as Omni making the switch over easy stuff too (which is why I always start with Omni when AIing)
 

Offline Vertigo

  • *
  • Posts: 4547
  • Rep: 5
    • View Profile
    • Awards
Re: AIing - Almost There!
« Reply #29 on: July 11, 2010, 04:39:00 AM »
That works

Offline JoeBlo

Re: AIing - Almost There!
« Reply #30 on: July 11, 2010, 04:40:51 AM »
text file with both

Offline Badnik96

  • tired of your shit
  • *
  • Posts: 17537
  • Rep: 3
    • Badnik96GTM
  • Awards BOTM Winner
    • View Profile
    • BattleBots Wiki
    • Awards
  • See profile for gamer tags: Yes
  • Skype: Badnik96
Re: AIing - Almost There!
« Reply #31 on: July 11, 2010, 08:56:56 AM »
The reason it wasn't firing in the first place was because there were no Weapons numbers in the bindings line!

Just saying.

Offline JoeBlo

Re: AIing - Almost There!
« Reply #32 on: July 11, 2010, 09:07:33 AM »
LOL I didnt even see that he posted the bindings :P

oh well Flipper.py on a pop up isnt good anyway

Offline Stagfish

  • Ultra Heavyweight
  • Posts: 2963
  • Rep: 0
    • View Profile
    • Awards
Re: AIing - Almost There!
« Reply #33 on: July 11, 2010, 12:00:28 PM »
I posted a video tutorial on how to Ai bots in the tutorial section

Offline Vertigo

  • *
  • Posts: 4547
  • Rep: 5
    • View Profile
    • Awards
Re: AIing - Almost There!
« Reply #34 on: July 12, 2010, 01:17:37 PM »
Thanks guys, I think I can do simple AI now.
Just AI'd a flipper & a juggler succesfully :D

Offline JoeBlo

Re: AIing - Almost There!
« Reply #35 on: July 13, 2010, 08:47:31 PM »
Protip: Python files may appear very complex but most have help right at the start for AI'ing

open up one in Notepad that required a smartzone and it will tell you the control name and SZ name

Code: [Select]
        self.zone = "weapon"
        self.triggers = ["Fire"]

can be quite helpful if you dont know... I believe the AI chart does the same but if you just need a quick refresh, keep it in mind  ;)

Offline Jack Daniels

  • *
  • Posts: 2719
  • Rep: 9
  • Losing Tournaments with Style
    • matt.morrill.12
  • Awards BOTM Winner
    • View Profile
    • My abandoned online RPG project.
    • Awards
Re: AIing - Almost There!
« Reply #36 on: July 13, 2010, 09:51:27 PM »
Vertigo, it is wicked awesome that you are taking the time to learn this stuff on your own.  It can be really frustrating sometimes, but when you get it nailed it is really rewarding. 

*clicks Good button for respect to Vertigo*

Offline Madiaba

Re: AIing - Almost There!
« Reply #37 on: July 14, 2010, 01:41:17 AM »
Yep, JD.  Agreed.  Thanks for contributing, Vert.
Cool to see people 'diving in'. 


Nice move, Joe,.. to just show them how to find it for themselves. Simple.
(hope they use Python to open/edit)

Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline JoeBlo

Re: AIing - Almost There!
« Reply #38 on: July 14, 2010, 01:59:32 AM »
oops I told them to use notepad hehe

well its not advised for editing but viewing its ok in notepad

Offline Vertigo

  • *
  • Posts: 4547
  • Rep: 5
    • View Profile
    • Awards
Re: AIing - Almost There!
« Reply #39 on: July 14, 2010, 01:27:58 PM »
oops I told them to use notepad hehe

well its not advised for editing but viewing its ok in notepad
I'm editing it using wordpad  :ermm:, whatever you say, it works :P