gametechmods
Robot Arena => General Support => Topic started by: Reier on October 11, 2008, 02:22:57 PM
-
What type of program do I use to read .py files? I didn't find another topic about this. Thanks!
-
Notepad++. I'm using that and it's cool. Just google it.
-
I have a type of Notepad, & it doesn't peirce it. Maybe I don't have Notepad++.
-
Hmm? I can open .py files with normal notepad.
-
Nevermind, I guess I can read it. I just have no idea what they mean. =P
-
Nevermind, I guess I can read it. I just have no idea what they mean. =P
for a good tutorial : https://gametechmods.com/?do=Guide_to_AIing
a standard entry is like (at least) this :
list.append(("myBotName","theKindOfBot", {'weapons': (a number for each weapon)}))
For instance :
list.append( ("KillerBot", "Spinner", { 'weapons': (21, 22) }) )
the number 21,22 does not mean nothing but there are two weapons for this bot. Once it will loose it two weapons, the bot will react as if it has a 'Pusher' AI.
You can also add other option :
# nose - "front" of bot in radians (default 0)
# invertible - can function upside-down (default False)
# topspeed - speed in meters/second AI will attempt not to exceed (default 4.0)
# throttle - maximum analog value AI will attempt not to exceed (default 100)
# turnspeed - turning in radians/second AI will attempt not to exceed (default 2.5)
# turn - maximum analog value AI will attempt not to exceed (default 60)
# radius - bot radius to use for checking for hazards and walls (default 1.0)
For instance if killerBot is invertible ('invertible'), try to avoid danger ('radius'), speedy ('speed') and had a little angle of turn ('turn'), it may be :
list.append( ("KilleBot", "Spinner", { 'invertible':True, 'radius':1, 'topspeed' : 99, 'turn':30, 'weapons': (1, 2) }) )
the kind of bots you can choose from : it is the other file.py under your TEAM directory. If you don't know : just say 'Omni'
5 last points :
-if you use a piston, you need to tell the AI when to fire : this is done by the custom zone (usually called 'weapon'). Once a bot enter this zone, your bot 'fires'
-if the direction of your bot is not good, correct it with 'nose':math.pi or 'nose':math.pi/2
-indentation is very important when you add a line in bindings.py, otherwise it crashes the game
-once you have made a bot, export it with a name 'bot0'.. 'bot5', replace a bot with the same name in th AI/TeamXXX directory, add your line to the bindings.py.
-the name of the controler must be Forward and LeftRight for the driving ones, it may be 'Fire', 'Spin' or 'Flip' for the other ones, depending of the kind of AI you use.
Try first to AI Spinner, they are the easiest ones for they do not need custom zone.
Here is a standard Spinner Entry (nor the indentation) :
list.append( ("MyBotName", "Spinner", { 'radius':0.5, 'topspeed' : 99, 'turn':30, 'weapons': (1, 2,3,4) }) )
Hope it helps you.
-
There should also be a tutorial on how to edit .bot files...? Venko meant to teach me via msn but he spent most of the time talking about his own fantasies.
-
I'll send you a chart on what's what, Gig, if you'd like.
-
There should also be a tutorial on how to edit .bot files...? Venko meant to teach me via msn but he spent most of the time talking about his own fantasies.
I just saw this post and started thinking. Doesnt the fact that venko knows how to edit bot files and his ridiculous stacking strike anyone as suspicious?
-
SD, Let's NOT go there again.
FYI: He approached me asking to learn the AAM stuff that many were accusing him of doing. I told him later I would. He was a little embarrassed that others knew AAM and he did not. I finally taught Venko at least a couple months after people accused him of AAM. He really knew nothing when i first began sharing stuff.
Also: He is just extremely patient and has a very good comp, monitor and mouse set-up which helps, and probably biggest of all, practically lives in front of his comp with RA2.
-
There must not be much to do in Bulgaria in the summer.
-
He actually keeps saying that he goes to parties, drinks, gets laid, has a lot of friends, etc...
-
Then he must use a laptop.
-
Every time I edit the Bindings.py file the game crashes I try to add list.append(("Killdozer","Rammer",{'invertible':True,'nose':math.pi,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(10,)}))
with note pad the that comes with the cumputer and ya it just crashes HELP :vista:
-
Notepad does that. Use Notepad++ and edit your bindings there. :D
-
it is possable to AI in notepad, I have done it before
Python is far better though, for it has a Check Module that finds errors for you :mrgreen:
-
Ok I'll try that and see if the game works with that now thanks :smile:
-
bump!
-
really no need since it was kinda on topic and he got help out of it
bumpings only bad if someone posts something like "LOLZ so funny" or "Linkz teh brocken" or similar :mrgreen:
-
WTF does 'brocken' mean?
-
Who cares if it's a bump. I really don't see what the deal is anyway with revivals.
-
WTF does 'brocken' mean?
just an extra c I sometimes do that when typing really fast, It just comes from habit, going o-c-k rather then just o-k. still no need for spam posts
@Reier if its not on topic or worthless the old topic's everyone has read get mixed in all the unread stuff
-
I have looked at that guide to AIing and I still can't AI my Robots. Can someone help me :( Every time I put my team in the team note pad and i try using them it just crashes my game
-
I'll help you GroudonRobotWars. Tell me the exact steps that you took.
-
I'll help you GroudonRobotWars. Tell me the exact steps that you took.
I basicly created folders for 10 teams and went to the teams notepad and copied down the information on the team but when I go in the game it crashes.
Edit: I got the bindings open and i tryed adding stinger in to a team and it still crashed my game.
-
Quick quiz: What does the C++ runtime error screen mean again? I edited the bindings to FBS and it crashes when I use the SNS in question.
-
Post the bindings line.
And what .py was it before?
-
FBS.py, as he said.
And it depends if it crashes in the arena or when the bot is loading.
-
And what .py was it before?
-
FBS? I mean FBS_1. I'll never use FBS, it's ghey.
And before? Omni.
Edit: I accidentally renamed the bot. whoops.
-
Rename the 'Forward' control to 'Ahead'. I don't know if that's the issue.
-
Well I posted a new group of bots, it opened my game without crashing but when i tried opening the team it crashed my game.
-
Can someone please help!!!!
-
If nobody else helps you, GRW, if you have an IM like yahoo or MSN I will.
-
If nobody else helps you, GRW, if you have an IM like yahoo or MSN I will.
Ok for Yahoo do you mean email.
-
Yahoo Instant Messaging.. email is way to slow...
when ever you ask for help always provide the details of what you did fully, we can do absolutely nothing to help you without this knowledge.. this means in full descriptions and showing us the changes you made by using the code box and putting bindings in it like so..
list.append.........
it will get you much quicker solutions that way ;)
-
list.append( ("101", "Rammer", { 'weapons': (4, 1), 'invertible': True }) )
list.append( ("The Windcallers", "Spinner", { 'topspeed': 190.0, 'turnspeed': 150.0, 'throttle': 110, 'weapons': (21, 22, 1, 2) }) )
list.append(("Spinner from the west","SpinnerOmni",{'range':99,'radius':1,'topspeed':99,'throttle':130,'turn':60,'turnspeed':3.5,'weapons':(3,)}))
list.append(("Trident","Rammer",{'invertible':True,'radius':1,'topspeed':100,'throttle':130,'turn':50,'turnspeed':1.5}))
list.append( ("1337", "Pusher", { 'invertible': True, 'radius':1.4, }) )
list.append( ("Dragon Spawn", "Spinner", { 'topspeed' : 12.0, 'throttle' : 125, 'turnspeed' : 1.5, 'weapons': (15,) }) )
Thats what I put
-
The bindings look fine to me. Make sure that:
- You have Rammer.py, Spinner.py, SpinnerOmni.py, and Pusher.py in your AI folder.
- You have at least 15 AI teams.
- All these bots are in a folder named "TeamX" where X is the number of their team in Teams.txt.
- The bot files are named Bot0.bot, Bot1.bot, Bot2.bot, Bot3.bot, Bot4.bot, and Bot5.bot.
-
101 and 1337 look like they are missing a lot from their binding lines.
-
101 and 1337 look like they are missing a lot from their binding lines.
Not much weapons and they are invertable
-
The bindings look fine to me. Make sure that:
- You have Rammer.py, Spinner.py, SpinnerOmni.py, and Pusher.py in your AI folder.
- You have at least 15 AI teams.
- All these bots are in a folder named "TeamX" where X is the number of their team in Teams.txt.
- The bot files are named Bot0.bot, Bot1.bot, Bot2.bot, Bot3.bot, Bot4.bot, and Bot5.bot.
got all that but if i am using DSL and there is 20 teams do i still do TeamX?
-
It looks like these aren't correct:
list.append( ("101", "Rammer", { 'weapons': (4, 1), 'invertible': True }) )
list.append( ("The Windcallers", "Spinner", { 'topspeed': 190.0, 'turnspeed': 150.0, 'throttle': 110, 'weapons': (21, 22, 1, 2) }) )
They are both missing a bracket at the end (I think?) and in 101 you need a comma after the weapons like this:
list.append( ("101", "Rammer", { 'weapons': (4, 1,), 'invertible': True }) )
:D
-
Actually Gazea, neither of the things you said are correct.
-
There are loads of extra spaces.
-
Actually Gazea, neither of the things you said are correct.
Aren't they? I had to do that for my bindings.
-
@Gazea2: G.K. is right.
@GroudonRobotWars: The problem is that you have a trailing comma after 'radius':1.4 for 1337. If you are still experiencing problems, make sure that every line has a total of 4 spaces (no tabs) before each of the lines that you posted.
The bindings look fine to me. Make sure that:
- You have Rammer.py, Spinner.py, SpinnerOmni.py, and Pusher.py in your AI folder.
- You have at least 15 AI teams.
- All these bots are in a folder named "TeamX" where X is the number of their team in Teams.txt.
- The bot files are named Bot0.bot, Bot1.bot, Bot2.bot, Bot3.bot, Bot4.bot, and Bot5.bot.
got all that but if i am using DSL and there is 20 teams do i still do TeamX?
Click's suggestions hold true regardless of what AI pack is installed. There should be the same number of Team folders as there are indexes in Teams.txt. If you have just been replacing othert DSL bots, there shouldn't be any problems. If you have been adding teams for your AI bots, make sure that you have a corresponding index in Teams.txt.
-
Ok, sorry. Just trying to help. :)
-
@Gazea2: G.K. is right.
@GroudonRobotWars: The problem is that you have a trailing comma after 'radius':1.4 for 1337. If you are still experiencing problems, make sure that every line has a total of 4 spaces (no tabs) before each of the lines that you posted.
The bindings look fine to me. Make sure that:
- You have Rammer.py, Spinner.py, SpinnerOmni.py, and Pusher.py in your AI folder.
- You have at least 15 AI teams.
- All these bots are in a folder named "TeamX" where X is the number of their team in Teams.txt.
- The bot files are named Bot0.bot, Bot1.bot, Bot2.bot, Bot3.bot, Bot4.bot, and Bot5.bot.
got all that but if i am using DSL and there is 20 teams do i still do TeamX?
Click's suggestions hold true regardless of what AI pack is installed. There should be the same number of Team folders as there are indexes in Teams.txt. If you have just been replacing othert DSL bots, there shouldn't be any problems. If you have been adding teams for your AI bots, make sure that you have a corresponding index in Teams.txt.
I put the team 21 in the text with the correct info but when i try to use the team it just crashes my game
-
Do you mind posting Team21's Teams.txt reference? It sounds like the problem is there.
-
Team 21
Thunder Bots
"Bots Of Thunder"
AI\arclogo.bmp
Robots: 0 1 2 3 4 5
Robot In Event: -1
0
16
16
0
0
0
0
0
100000
true
0
false
0
-1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0
0
-
bingo.. right at the start
you dont write Team 21 you write index 21 as seem below
index 21
The Scrappers
"We are scrap parts specialists."
AI\the_scrappers.bmp
Robots: 0 1 2
Robot In Event: -1
0
16
16
0
0
0
0
0
100000
true
0
false
0
-1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0
0
then make sure you have a Team 21 folder in the AI folder
-
Thanks and i do have a team 21 in my folder
Edit: I put the right thing went in the game tryed opening the team and it still crashed.
-
How many bots are in the Team 21 folder? If you are adding less than 6 bots, you need to change your current Team.txt index so that it isn't loading bots that don't exist.
This line would be changed depending on which bots you have in the Team 21 folder:
Robots: 0 1 2 3 4 5
For example, if your folder only contains one HW bot, you would rename the file so that it is called Bot2.bot then you would replace the above line (from Teams.txt) with:
Robots: 2
-
Is the team folder named Team21?(Not Team 21)
-
Ohhhh....
Edit Got the team open but now the problem is when i try playing with the bots it says runtime error
-
Are all the bots in that team not working?
When do you get the error? (it it before or after the countdown)
-
Are all the bots in that team not working?
When do you get the error? (it it before or after the countdown)
I get it before the countdown
-
its either the AI or arena.. try different arenas as see what happens
-
It might be the combat arena, robotwars arena or battlebots arena
-
just try multiple arenas and see if you get the same result.. then arenas can be taken out of the equation and we can focus on AI issues
-
5 of 6 work. Spinner from the west is the only one that does not work
-
Assuming that you got SFTW from the BBEANS AI Pack:
Do you have SpinnerOmni.py in your AI folder, adaptiveAI_2.txt in the main RA2 directory, and the arena Epic Showdown installed (and working). It has to do with one of the Easter Eggs of the pack.
Otherwise, you could switch the AI.py listed in the bindings to just plain "Omni".
-
Can anyone post the stock rookies team and the extra robots bindings for my stock version so i can make them AI
-
Could someone please send the bindings
-
There are no bindings for the Rookies and the XTRA bots, unless someone made some (though I don't know why you would bother especially since Forkie would require a custom .py).
-
why?
-
it uses a servo to lift
-
I AI'ed them for my 128 MW bot tournament. I replaced Forkie's servo with a snapper2 though.
-
I plan on adding them into a tournament with all the other stock ai and other robots I aied.
-
New problem i need to ai my ELBITE Entrys and i am stuck on two robots the first one is one of them is a bot like Mako and it has one spinner and the weapon attached are The Boxers weapon. which weapons are they for the numbers at the end?
-
What .py are you planning to use?
-
What .py are you planning to use?
Omni
-
Then the number you put there won't matter. The tactic of the .py is already engage. You can put whatever you like there. Make sure that if it's only one number you use, you have a comma after it.
-
# 29 - The End of the Road
list.append(("The Dark Boxer","Omni",{'invertible':True,'nose:math.pi*2,,range':50,'radius':1.2,'topspeed':100,'throttle':130,'turn':75,'turnspeed':3,'weapons':(
list.append(("Angry German Kid","Flipper",{'nose':math.pi*2,'radius':1,'topspeed':100,'throttle':130,'turn':100,'turnspeed':3.5,'weapons':(14,)}))
list.append(("Beserk Killer",
This i what i so far got
-
I presume we're referring to the dark boxer?
-
Yes to the Dark Boxer.
And I have no clue what Beserk Killer is. It spins but not with no motors used.
-
Try
list.append(("The Dark Boxer","Omni",{'invertible':True,'nose:math.pi*2,,range':50,'radius':1.2,'topspeed':100,'throttle':130,'turn':75,'turnspeed':3,'weapons':(1
,)}))
For the dark boxer.
Can you post a pic of Beserk Killer?
-
Try
list.append(("The Dark Boxer","Omni",{'invertible':True,'nose:math.pi*2,,range':50,'radius':1.2,'topspeed':100,'throttle':130,'turn':75,'turnspeed':3,'weapons':(1
,)}))
For the dark boxer.
Can you post a pic of Beserk Killer?
Possibly in the next hour or so. Do you think the Bindings for Angry German Kid are correct.
-
(https://gametechmods.com/uploads/images/32162screenshot_3.jpg)
This is Beserk Killer
-
I designed it to be like one of the designs that appeared on Total Annihilation
-
Make a copy of your "LeftRight"
Name the copy "Spin" (make sure its still an analog)
Name your forward to "Ahead"
Get a copy of FBS_1 if you dont have already
And use a binding line like this
list.append(("Beserk Killer","FBS_1",{'invertible':True,'nose':math.pi*2,'PreSpinEntrance':3, 'SpinDirection(1/-1)':-1, 'ReMobilizeRoutineTime(10-60)':30, 'range':99, 'radius':4, 'topspeed':100, 'throttle':130, 'turn':60, 'turnspeed':2, 'weapons':(1)}))
-
The team won't open in the game.
-
the team ?
then you have made a mistake with your teams text
https://gametechmods.com/forums/index.php/topic,3942.0.html (https://gametechmods.com/forums/index.php/topic,3942.0.html)
-
here is the team index
index 29
The End of the Road
"This is the end for you"
AI\end.bmp
Robots: 0 1 2
Robot In Event: -1
0
16
16
0
0
0
0
0
100000
true
0
false
0
-1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0
0
-
index 29
The End of the Road
"This is were your robots lifes end!"
AI\end
Robots: 0 1 2
Robot IN Event: -1
0
16
16
0
0
0
0
0
100000
true
0
false
0
-1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0
0
Got the one i was going to use for the ELBITE
-
TP I am trying to AI to get ready for my tournament. And I acually got a bot (Crabmeat by Jack Daniels from the bot exchange) from a team to work but it just only runs forward and it is backwards in the begining of a fight so it keeps running into the wall. And the other bot T-4 from the BBEANS bot pack from the bots section in the downloads catagory does not work at all.
The bindings: # 21 - Team Xforce
list.append(("T-4","Flipper",{'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(1)}))
list.append(("Crabmeat","Rammer",{'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5}))
-
here is the team index
index 29
The End of the Road
"This is the end for you"
AI\end.bmp
Robots: 0 1 2
Robot In Event: -1
0
16
16
0
0
0
0
0
100000
true
0
false
0
-1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0
0
This looks fine. But the other one you posted is full of errors. Make sure your Teams.txt entry looks like this.
-
Replace you latest bindings with these:
# 21 - Team Xforce
list.append(("T-4","Flipper",{'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(1,)}))
list.append(("Crabmeat","Rammer",{'radius':0.1,'nose':math.pi*2,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5}))
You needed a comma after the weapon ID for T-4 and you needed to reverse the nose heading for Crabmeat.
-
Still having problems withe crabmeat. It starts backwards and drives out of the online arena. Those bindings did not work for crabmeat but worked with T-4
-
delete the part I have marked in red for Crabmeat
list.append(("Crabmeat","Rammer",{'radius':0.1,'nose':math.pi*2,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5}))
now it will face the correct way
Edit: is it actually 180 degrees the wrong way ??? or less amount (say 90)
-
180 degrees
Here is the picture:
(https://gametechmods.com/uploads/images/45715screenshot_1.JPG)
-
then deleting that part I said should fix this.. just wondering as trov put it there to fix the problem to start with
-
Darn, Joe beat me to it... I don't know what I was thinking when I suggested PI*2...
-
It still doesn't work
-
GRW, did you get it working correctly yet? If not, just send over (PM) the bot and bindings line and I'll help out.
*Wonders where the 'Mods' are...*