gametechmods

Robot Arena => General Support => Topic started by: Vertigo on July 11, 2010, 02:16:48 AM

Title: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 02:16:48 AM
Right, I have eventually managed to create my own team, put a robot in it, have it drive towards its opponent & self right!
But the bot won't fire its weapon
What have I done wrong?

Controls:
(https://gametechmods.com/uploads/images/79066screenshot.jpg)

Smart Zone:
(https://gametechmods.com/uploads/images/72833screenshot_1.jpg)

Nose Direction:
(https://gametechmods.com/uploads/images/76855screenshot_3.jpg)

Bindings:
    list.append(("True Inertia 3","Flipper",{'nose':math.pi*
2,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.
5}))

Title: Re: AIing - Almost There!
Post by: JoeBlo on July 11, 2010, 02:43:08 AM
those are the correct names.. hmm I dont know then

are you sure the other robot is in the SZ, pause the game with the pause key and use F12 to see if it is in it
Title: Re: AIing - Almost There!
Post by: System32 on July 11, 2010, 02:47:20 AM
Meh, it happens. Dlete you controls and retry, if that doesn't work, you are screwed.
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 02:50:31 AM
those are the correct names.. hmm I dont know then

are you sure the other robot is in the SZ, pause the game with the pause key and use F12 to see if it is in it
SZ?

But yes,it does appear as a load of green lines in a load of green lines if the F12 key is pressed during a match
Title: Re: AIing - Almost There!
Post by: Daemon on July 11, 2010, 02:53:39 AM
Bindings:
    list.append(("True Inertia 3","[blink]Omni[/blink]",{'nose':math.pi*
2,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.
5}))
Space=Fire
SmartZone=weapon
try this
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 02:56:13 AM
Bindings:
    list.append(("True Inertia 3","[blink]Omni[/blink]",{'nose':math.pi*
2,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.
5}))
Space=Fire
SmartZone=weapon
try this
Shouldn't that be

list.append(("True Inertia 3","[blink]Omni[/blink]",{'nose':math.pi*
2,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.
5}))
Space=Flip
SmartZone=flip

Title: Re: AIing - Almost There!
Post by: Daemon on July 11, 2010, 03:04:11 AM
Bindings:
    list.append(("True Inertia 3","[blink]Omni[/blink]",{'nose':math.pi*
2,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.
5}))
Space=Fire
SmartZone=weapon
try this
Shouldn't that be

list.append(("True Inertia 3","[blink]Omni[/blink]",{'nose':math.pi*
2,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.
5}))
Space=Flip
SmartZone=flip
It can be, just try.
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 03:11:18 AM
That crashes my game
Title: Re: AIing - Almost There!
Post by: Thyrus on July 11, 2010, 03:15:52 AM
Code: [Select]
list.append(("True Inertia 3","Omni",{'nose':math.pi*
  2,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.
  5}))

this has happen often to me. Omni helped me alot.
Title: Re: AIing - Almost There!
Post by: Daemon on July 11, 2010, 03:16:23 AM
That crashes my game
Open AI folder and search Omni file,
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 03:23:51 AM
That crashes my game
Open AI folder and search Omni file,
It is there
Title: Re: AIing - Almost There!
Post by: Thyrus on July 11, 2010, 03:26:21 AM
Did you try the code I posted?
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 03:26:55 AM
Did you try the code I posted?
Yep, still didn't work, & it didn't self right
Title: Re: AIing - Almost There!
Post by: Thyrus on July 11, 2010, 03:29:26 AM
you have to name the smartzone "weapon" and add a Srimech button to the controll.
Title: Re: AIing - Almost There!
Post by: G.K. on July 11, 2010, 03:32:02 AM
No he doesn't. You just need to use flipper.py.
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 03:37:37 AM
you have to name the smartzone "weapon" and add a Srimech button to the controll.
Should the weapon control be called 'Fire'or 'Flip'?
I've got it as fire & it doesn't work
Title: Re: AIing - Almost There!
Post by: JoeBlo on July 11, 2010, 03:39:15 AM
Daemon bindings fail becasue of the [blink] stuff.. I dont know why that is there

Omni needs a SZ of weapon and Trigger of Fire

Flipper will serve the same purpose but will leave inverted robots alone


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

check your wiring is it correct ? test it in the bot lab

and (how can I put this kindly) for some others, if you dont know what your talking about dont tell people what to do just causes bigger messes, thanks, I know your thoughts are positive.
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 03:42:29 AM
check your wiring is it correct ? test it in the bot lab
Yes
Title: Re: AIing - Almost There!
Post by: JoeBlo on July 11, 2010, 03:50:55 AM
send me the robot via pm... after reading some posts it seems you misunderstood what I meant about F12
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 03:54:55 AM
Sent
Title: Re: AIing - Almost There!
Post by: JoeBlo on July 11, 2010, 03:56:35 AM
why are you wanting to use Flipper.py on a pop up ?
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 03:59:21 AM
I don't know really, but slashback has it & is also a true popup
Title: Re: AIing - Almost There!
Post by: JoeBlo 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
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 04:11:00 AM
Fine
Title: Re: AIing - Almost There!
Post by: JoeBlo on July 11, 2010, 04:15:01 AM
Im offering to take you through AI... if you dont want me to tell me now
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 04:17:10 AM
OK, accepted
Title: Re: AIing - Almost There!
Post by: JoeBlo 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
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 04:27:02 AM
That crashes my game
Title: Re: AIing - Almost There!
Post by: JoeBlo 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)
 
Title: Re: AIing - Almost There!
Post by: Vertigo on July 11, 2010, 04:39:00 AM
That works
Title: Re: AIing - Almost There!
Post by: JoeBlo on July 11, 2010, 04:40:51 AM
text file with both
Title: Re: AIing - Almost There!
Post by: Badnik96 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.
Title: Re: AIing - Almost There!
Post by: JoeBlo 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
Title: Re: AIing - Almost There!
Post by: Stagfish on July 11, 2010, 12:00:28 PM
I posted a video tutorial on how to Ai bots in the tutorial section
Title: Re: AIing - Almost There!
Post by: Vertigo 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
Title: Re: AIing - Almost There!
Post by: JoeBlo 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  ;)
Title: Re: AIing - Almost There!
Post by: Jack Daniels 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*
Title: Re: AIing - Almost There!
Post by: Madiaba 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)

Title: Re: AIing - Almost There!
Post by: JoeBlo 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
Title: Re: AIing - Almost There!
Post by: Vertigo 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
Title: Re: AIing - Almost There!
Post by: martymidget on July 14, 2010, 02:15:02 PM
I use notepad  :ermm:
Title: Re: AIing - Almost There!
Post by: G.K. on July 14, 2010, 02:16:58 PM
Python 2.5 ftw!
Title: Re: AIing - Almost There!
Post by: Thyrus on July 14, 2010, 02:19:04 PM
better not use the editor that comes with windows. Joe knows what I`m talking about :/
Title: Re: AIing - Almost There!
Post by: Madiaba on July 14, 2010, 08:44:16 PM
You can use Notepad++ and such for editing, but Python has some additional cool features, and is just as easy to use.
Title: Re: AIing - Almost There!
Post by: Trovaner on July 14, 2010, 10:24:02 PM
Although I have python, I prefer a combination of Notepad++ and firebeetle's cheat menu. Notepad++ has better highlighting colors IMO and the ability to have multiple tabs make it irreplaceable (actually, regit might be an alternative worth looking into...). Most problems in the python, I can find by doing a quick "print" in the FPS window (before the game closes).
Title: Re: AIing - Almost There!
Post by: JoeBlo on July 14, 2010, 11:58:23 PM
Madiaba got me started with Python

but I sometimes use notepad for quick tweaks :O sorry Mad, force of habit
Title: Re: AIing - Almost There!
Post by: Madiaba on July 15, 2010, 01:27:31 AM
YOU TWO.... have rebelled....against your mentor. :eek:    (gotten smarter too..)
 
I formally decree:
                     Death!......by Blueberry pancakes. :dead:
 
 
 
Title: Re: AIing - Almost There!
Post by: Hydro on July 15, 2010, 02:48:28 AM
Tasty way to die.
Title: Re: AIing - Almost There!
Post by: LiNcK on July 15, 2010, 03:48:37 PM
Tasty way to die.

Not if you dont like Blueberry :p
Title: Re: AIing - Almost There!
Post by: Vertigo on July 19, 2010, 01:46:30 PM
Tasty way to die.

Not if you dont like Blueberry :p
When dead, people don't tend to taste much
Title: Re: AIing - Almost There!
Post by: Vertigo on July 20, 2010, 03:53:48 AM
OK, didn't last long without the need of help once more :P
I know that there is something wrong with these bindings because the game crashes when I try to start a match

Whats wrong with this:
    list.append(("Rioting Defense 3","Rammer",
{'invertible':True,'radius':2,'topspeed':100,'throttle':120,'turn':60
,'turnspeed':2.5}))
Title: Re: AIing - Almost There!
Post by: Stagfish on July 20, 2010, 02:12:55 PM
No weapons /:l
Title: Re: AIing - Almost There!
Post by: Vertigo on July 20, 2010, 03:12:31 PM
OK, didn't last long without the need of help once more :P
I know that there is something wrong with these bindings because the game crashes when I try to start a match

Whats wrong with this:
    list.append(("Rioting Defense 3","Rammer",
{'invertible':True,'radius':2,'topspeed':100,'throttle':120,'turn':60
,'turnspeed':2.5}))
I solved it
Title: Re: AIing - Almost There!
Post by: Vertigo on September 03, 2010, 04:18:30 AM
I'm back with a new game of 'Spot The Error In The Bindings'!

    # 109 - Team Bulldozer "Vertigo Robotics" (Vertigo)
    list.append(("AW - AntDozer","Flipper",{'nose':math.pi*
2,'range':99,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'tu
rnspeed':5,'weapons':(18,19)}))
Title: Re: AIing - Almost There!
Post by: G.K. on September 03, 2010, 04:25:15 AM
Where does it crash?
Title: Re: AIing - Almost There!
Post by: Naryar on September 03, 2010, 04:38:34 AM
Rammer.py doesn't needs any 'weapons' entry.

And remove that useless range value. Range in a flipper ? Srsly ?

And math.pi*2 is 2pi radians = 0. You can also remove that nose value if you had no need to  change the forward heading.
Title: Re: AIing - Almost There!
Post by: Vertigo on September 03, 2010, 06:14:36 AM
Where does it crash?
When I try to start the match, I can select the bot & everything

Rammer.py doesn't needs any 'weapons' entry.

And remove that useless range value. Range in a flipper ? Srsly ?

And math.pi*2 is 2pi radians = 0. You can also remove that nose value if you had no need to  change the forward heading.
OK, I'll try that
Title: Re: AIing - Almost There!
Post by: G.K. on September 03, 2010, 06:20:13 AM
Have you definitley spelt the name right?
Title: Re: AIing - Almost There!
Post by: Vertigo on September 03, 2010, 06:21:27 AM
Have you definitley spelt the name right?
Yes

Changed the bindings to

    list.append(("AW -
AntDozer","Flipper",'radius':0.1,'topspeed':100,'throttle':130,'turn'
:60,'turnspeed':5}))

Now it crashes when I start up the game
Title: Re: AIing - Almost There!
Post by: G.K. on September 03, 2010, 06:25:35 AM
You forgot the first strange shaped bracket.
Title: Re: AIing - Almost There!
Post by: Vertigo on September 03, 2010, 06:35:27 AM
I don't think its that G.K, because, ermm...
Title: Re: AIing - Almost There!
Post by: Vertigo on April 18, 2011, 09:57:52 AM
"Warning: this topic has not been posted in for at least 180 days.
Unless you're sure you want to reply, please consider starting a new topic. "

^lol^
Yays, I've had no AI problems for over 180 days :P

Anyway, what would be the nose command for this?
(https://gametechmods.com/uploads/images/79671Nose.jpg)
Title: Re: AIing - Almost There!
Post by: Clickbeetle on April 21, 2011, 11:24:22 PM
math.pi*1.5
Title: Re: AIing - Almost There!
Post by: Vertigo on April 22, 2011, 02:56:26 AM
Thanks :D