Author Topic: AI Problem/Questions  (Read 3820 times)

Offline Cobra!

  • Antweight
  • Posts: 51
  • Rep: 0
    • https://www.facebook.com/
    • Cobradabest
    • View Profile
    • Gamerstorm
    • Awards
  • See profile for gamer tags: Yes
  • Skype: cobradabest
AI Problem/Questions
« on: October 09, 2012, 04:42:35 PM »
I recently learn how to do AI, and I've been making and tweaking them like there's no tomorrow, however, I have a problem:

One of the robots I made into an AI, is a flipper robot, doesn't flip at all, it self rights when it's flipped itself, but when it's got it's flipper under another robot, it doesn't do anything.
I reckon it might have something to do with the weapon constructor in the bindings.py, if it means what weapons that AI has.
Fixed the problem, I renamed the smart-zone "flip", and it did the trick!

I also have a similar problem with a "pusher" robot, it has a srimech, but when flipped, it doesn't self right. It turns out "Pusher" was a stock py, and didn't recognise Srimechs, so I used OmniRam instead.

I checked, the smart zone for the first bot is named "weapon", and the controls are named "Fire" and "Srimech" respectively.

So what do I do?


I also have a few questions about custom AIs:
What is the Weapons constructor exactly? What does each value represent? They must mean something. Solved, I know now.
Is it possible to use make the "watch" camera follow an AI? I've seen a video of someone doing what looks like that.
Is it possible to have a invertible robot with a srimech as in if the srimech fails or breaks, just operate inverted?
Is it possible to have Frenzy robots use weapons? I want one of my robots to have either style, but when I choose either, the weapons don't operate. Solved
When a robot with a srimech goes to it's side, or anything but on it's back completely touching the floor, the srimech doesn't operate, how do I make them? Solved, kind of.
« Last Edit: October 11, 2012, 03:56:48 PM by Cobra! »

Offline cephalopod

Re: AI Problem/Questions
« Reply #1 on: October 09, 2012, 04:48:53 PM »
For your flipper issue (using flipper.py i assume), try renaming the flipper smartzone to 'flip' and control to Flip, as you may have the older version of Flipper.py as I do.

Also, there is a frenzy.py that should do something like you want.. I'm not experienced enough to answer the other stuff though :P
bristol bot builders / two headed death flamingo / snappy robots
//
kindest and friendliest '13, '15, '16, '17 / favourite staff member '14, '15

Offline ty4er

Re: AI Problem/Questions
« Reply #2 on: October 09, 2012, 04:50:45 PM »
I recently learn how to do AI, and I've been making and tweaking them like there's no tomorrow, however, I have a problem:

One of the robots I made into an AI, is a flipper robot, doesn't flip at all, it self rights when it's flipped itself, but when it's got it's flipper under another robot, it doesn't do anything.
I reckon it might have something to do with the weapon constructor in the bindings.py, if it means what weapons that AI has.
you need a smartzone, there should be some in the power section in normal dsl.


What is the Weapons constructor exactly? What does each value represent? They must mean something. If i remember rightly, they are used to determine when a robot switches tactics (say it has ran out of weapons on one side, it will switch to the other side), this is from my limited knowledge of ai though so i might be wrong. nobody really uses those values anyway so i wouldn't worry unless you decide to become joeblo or trovaner :P
Is it possible to have Frenzy robots use weapons? I want one of my robots to have either style, but when I choose either, the weapons don't operate. Which .py are you using? there should be a frenzy.py in there, if you arent already using that

it's good to see you can ai already, you may be wanting to look into tournaments if you are interested in that sort of thing.
DSL Showcase
is this bot don't lost all razors in a fight before do a damage thought

Offline martymidget

  • *
  • Posts: 3459
  • Rep: 7
  • Mr Flibble is very cross.
    • http://tts.imtranslator.n
    • View Profile
    • :)
    • Awards
Re: AI Problem/Questions
« Reply #3 on: October 09, 2012, 05:03:38 PM »
I also have a few questions about custom AIs:
Is it possible to have a invertible robot with a srimech as in if the srimech fails or breaks, just operate inverted?

Does putting "Invertible: 'True' in the bindings and having a srimech not work? If not, I'm fairly sure I've seen a .py that does that somewhere. Might be in Madiabas thread in the mod and designs section, if not, somewhere. :L

For everything else, what Craaig and Ty said. For .pys like Spinner.py, I think putting all the weapon identifiers in will be more beneficial.

Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI Problem/Questions
« Reply #4 on: October 09, 2012, 05:26:52 PM »
I don't know the answers to all of those but here are some that haven't been addressed
I also have a similar problem with a "pusher" robot, it has a srimech, but when flipped, it doesn't self right.

I checked, the smart zone for the first bot is named "weapon", and the controls are named "Fire" and "Srimech" respectively.

So what do I do?
"Srimech" will do nothing on the stock AI bindings (like "Pusher" or "Chopper").  It works if you use "OmniRam" or any variant of "Omni."  I assume you've downloaded the Starcore AI or some other AI pack?


I also have a few questions about custom AIs:
What is the Weapons constructor exactly? What does each value represent? They must mean something.
Is it possible to use make the "watch" camera follow an AI? I've seen a video of someone doing what looks like that.
1)Each number represents a component in your bot, and when all of said components are gone, that tells your bot that its weapon is gone.  Get Apanx's bot exporter and open your bot file in it.  This will let you see the "number" associated with each component on your bot, and then you just put the appropriate numbers in the "Weapons" constructor

2) Was it me?  If so, I'm fighting two AI'd bots against each other and using the F10 camera to follow them.

Offline Cobra!

  • Antweight
  • Posts: 51
  • Rep: 0
    • https://www.facebook.com/
    • Cobradabest
    • View Profile
    • Gamerstorm
    • Awards
  • See profile for gamer tags: Yes
  • Skype: cobradabest
Re: AI Problem/Questions
« Reply #5 on: October 10, 2012, 06:47:26 AM »
For your flipper issue (using flipper.py i assume), try renaming the flipper smartzone to 'flip' and control to Flip, as you may have the older version of Flipper.py as I do.
That worked, thanks!

I don't know the answers to all of those but here are some that haven't been addressed
I also have a similar problem with a "pusher" robot, it has a srimech, but when flipped, it doesn't self right.

I checked, the smart zone for the first bot is named "weapon", and the controls are named "Fire" and "Srimech" respectively.

So what do I do?
"Srimech" will do nothing on the stock AI bindings (like "Pusher" or "Chopper").  It works if you use "OmniRam" or any variant of "Omni."  I assume you've downloaded the Starcore AI or some other AI pack?
I suppose the only way to make the Stock bindings to recognise the srimech is if I went into the files and edited them? If so, I'm not that advanced yet.

I also have a few questions about custom AIs:
What is the Weapons constructor exactly? What does each value represent? They must mean something.
Is it possible to use make the "watch" camera follow an AI? I've seen a video of someone doing what looks like that.
1)Each number represents a component in your bot, and when all of said components are gone, that tells your bot that its weapon is gone.  Get Apanx's bot exporter and open your bot file in it.  This will let you see the "number" associated with each component on your bot, and then you just put the appropriate numbers in the "Weapons" constructor
Now all that happens is the game crashes when I try to load any of the AI up, even when I set the weapons back!

EDIT: Fixed it, lucky I backed the original up!

2) Was it me?  If so, I'm fighting two AI'd bots against each other and using the F10 camera to follow them.
All F10 does is change to a "Watch" camera that you can rotate with the mouse, it doesn't actually follow them.
« Last Edit: October 10, 2012, 09:16:45 AM by Cobra! »

Offline Cobra!

  • Antweight
  • Posts: 51
  • Rep: 0
    • https://www.facebook.com/
    • Cobradabest
    • View Profile
    • Gamerstorm
    • Awards
  • See profile for gamer tags: Yes
  • Skype: cobradabest
Re: AI Problem/Questions
« Reply #6 on: October 10, 2012, 02:33:48 PM »
I also have a few questions about custom AIs:
Is it possible to have a invertible robot with a srimech as in if the srimech fails or breaks, just operate inverted?

Does putting "Invertible: 'True' in the bindings and having a srimech not work? If not, I'm fairly sure I've seen a .py that does that somewhere. Might be in Madiabas thread in the mod and designs section, if not, somewhere. :L

For everything else, what Craaig and Ty said. For .pys like Spinner.py, I think putting all the weapon identifiers in will be more beneficial.
How do I do that?

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: AI Problem/Questions
« Reply #7 on: October 10, 2012, 04:48:49 PM »
2) Was it me?  If so, I'm fighting two AI'd bots against each other and using the F10 camera to follow them.
All F10 does is change to a "Watch" camera that you can rotate with the mouse, it doesn't actually follow them.
You have to move the camera. The F10 cam lets you move it any where you want to for better viewing.

Offline Cobra!

  • Antweight
  • Posts: 51
  • Rep: 0
    • https://www.facebook.com/
    • Cobradabest
    • View Profile
    • Gamerstorm
    • Awards
  • See profile for gamer tags: Yes
  • Skype: cobradabest
Re: AI Problem/Questions
« Reply #8 on: October 10, 2012, 04:59:52 PM »
2) Was it me?  If so, I'm fighting two AI'd bots against each other and using the F10 camera to follow them.
All F10 does is change to a "Watch" camera that you can rotate with the mouse, it doesn't actually follow them.
You have to move the camera. The F10 cam lets you move it any where you want to for better viewing.
I wanted to know how you can make the camera follow an AI, similar to how the watch camera follows a player. I've seen a video by someone I knew on Youtube and seen what looked like that.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: AI Problem/Questions
« Reply #9 on: October 10, 2012, 06:16:17 PM »
I recently learn how to do AI, and I've been making and tweaking them like there's no tomorrow, however, I have a problem:
One of the robots I made into an AI, is a flipper robot, doesn't flip at all, it self rights when it's flipped itself, but when it's got it's flipper under another robot, it doesn't do anything.
I reckon it might have something to do with the weapon constructor in the bindings.py, if it means what weapons that AI has.
As previously mentioned, you need a smartzone that is named correctly for the bot to know when to fire the burst motor.

I also have a similar problem with a "pusher" robot, it has a srimech, but when flipped, it doesn't self right.
I checked, the smart zone for the first bot is named "weapon", and the controls are named "Fire" and "Srimech" respectively.
So what do I do?
The original AI.py files do not have a Srimech control. Omni has a Srimech control and if you don't want to use the Engage tactic, you could give it no IDs for the weapon list (the replacement tactics are the same as the tactic used by Pusher.py).

I also have a few questions about custom AIs:
What is the Weapons constructor exactly? What does each value represent? They must mean something.
In the Bindings.py, the values in the weapons key define the component IDs that would need to break off before the bot switches tactics (usually Shove and Charge). If you don't want to switch tactics, the best bet is to include 0 (the component ID of the chassis). Otherwise, Apanx made an exporter that allows you to view the component IDs (from there, most people find all the comp IDs for their weapons).

Is it possible to use make the "watch" camera follow an AI? I've seen a video of someone doing what looks like that.
Are you referring to this? It currently hasn't been released yet but thats merely because I wanted to fix a compatibility issue with the Online Arena first.
There are some other possible ways of making a camera that follows an AI but I'm guessing that if it isn't the action cam or F10 cam then it is the F2 cam when there aren't any human players (however, this is also being controlled by the mouse).


Is it possible to have a invertible robot with a srimech as in if the srimech fails or breaks, just operate inverted?
AFAIK, the only AI.py that supports this is InvertOmni.py.

Is it possible to have Frenzy robots use weapons? I want one of my robots to have either style, but when I choose either, the weapons don't operate.
DSL comes with a Frenzy.py but I can't tell if thats what you are looking for (please elaborate). Frenzy.py is used for hammer bots that swing in two directions.

When a robot with a srimech goes to it's side, or anything but on it's back completely touching the floor, the srimech doesn't operate, how do I make them?
The only AI.py that is currently capable of doing this is Snow.py (used for intelligent popups).


Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI Problem/Questions
« Reply #10 on: October 10, 2012, 06:31:52 PM »
With regards to the FrenZy question, are you trying to build a robot that has a frenZy style hammer, plus a second active weapon like a flipper or pneumatic spike (like Mortis for example)?  I don't know of any such thing myself, but as long as we've got your attention Trov, maybe you can help, because I'd be interested in that too.

Offline Badnik96

  • tired of your shit
  • *
  • Posts: 17536
  • Rep: 3
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI Problem/Questions
« Reply #11 on: October 10, 2012, 08:28:55 PM »
For a srimech you want to have 'invertible':False somewhere in the bot's bindings.

Offline Mr. AS

  • TheGloriousCarbideArstotzkanIronsideChaosProtocol
  • *
  • Posts: 7557
  • Rep: 19
    • robotarenagtm
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI Problem/Questions
« Reply #12 on: October 10, 2012, 08:49:26 PM »
badnik i think it just defaults to false if there isnt 'invertible':true in the bindings

and as for frenzy-type bots i normally use electrichammer.py which is found in dsl bbeans ai on clickbeetles website
How you make Alarm Clock Pizza is:
Step 1: You buy an alarm clock from the store, and then you have to break it and put it in the sauce.
Step 2: Fold the sauce in 5 slices and put it in the dough.
Step 3: Paint the eggs with a pitcher of a clock showing what time you want to wake up and eat pizza for breakfast.
Step 4: Put the eggs in the dough.
Step 5: Make it flat into a round shape and draw the time you want on it.
Step 6: Put some old steel to prevent other peple from stealing it.
Step 7: Make it flat and cut into 60 slices 1 for each minute in 1 our.
Step 8: Put in the oven set the timer to 30048813.2884 seconds and put the temperature on 'Volcano' setting.
Step 9: If you think it is take to long, then get yor alarm clock and set it to now so that it will ring and you can take it out.
Step 10: Take it out uv the uvin wen it is redy and go to bed. In the morning eat pizza and also eat yor hands bi mistake.

Offline Cobra!

  • Antweight
  • Posts: 51
  • Rep: 0
    • https://www.facebook.com/
    • Cobradabest
    • View Profile
    • Gamerstorm
    • Awards
  • See profile for gamer tags: Yes
  • Skype: cobradabest
Re: AI Problem/Questions
« Reply #13 on: October 11, 2012, 04:10:27 PM »
I also have a similar problem with a "pusher" robot, it has a srimech, but when flipped, it doesn't self right.
I checked, the smart zone for the first bot is named "weapon", and the controls are named "Fire" and "Srimech" respectively.
So what do I do?
The original AI.py files do not have a Srimech control. Omni has a Srimech control and if you don't want to use the Engage tactic, you could give it no IDs for the weapon list (the replacement tactics are the same as the tactic used by Pusher.py).
You mean make it an omni, but take out the weapons constructor?


Is it possible to use make the "watch" camera follow an AI? I've seen a video of someone doing what looks like that.
Are you referring to this? It currently hasn't been released yet but thats merely because I wanted to fix a compatibility issue with the Online Arena first.
There are some other possible ways of making a camera that follows an AI but I'm guessing that if it isn't the action cam or F10 cam then it is the F2 cam when there aren't any human players (however, this is also being controlled by the mouse).

Nope, but it's close enough, it looks pretty awesome. I'll look forward to it's release, that is if there's a way I'll know when it does, I'll take you'll make a new topic somewhere on the forums once you release it?


Is it possible to have a invertible robot with a srimech as in if the srimech fails or breaks, just operate inverted?
AFAIK, the only AI.py that supports this is InvertOmni.py.
Oh right, thanks!


Is it possible to have Frenzy robots use weapons? I want one of my robots to have it, but when I choose it, the weapons don't operate.
DSL comes with a Frenzy.py but I can't tell if thats what you are looking for (please elaborate). Frenzy.py is used for hammer bots that swing in two directions.
Of course! The robot frenZy! How did I not guess that!? I thought it referred to some sort of tactic of just being crazy!


When a robot with a srimech goes to it's side, or anything but on it's back completely touching the floor, the srimech doesn't operate, how do I make them?
The only AI.py that is currently capable of doing this is Snow.py (used for intelligent popups).
Call me daft, but what do you mean by "popups"?

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: AI Problem/Questions
« Reply #14 on: October 11, 2012, 09:35:57 PM »
2) Was it me?  If so, I'm fighting two AI'd bots against each other and using the F10 camera to follow them.
All F10 does is change to a "Watch" camera that you can rotate with the mouse, it doesn't actually follow them.
You have to move the camera. The F10 cam lets you move it any where you want to for better viewing.
I wanted to know how you can make the camera follow an AI, similar to how the watch camera follows a player. I've seen a video by someone I knew on Youtube and seen what looked like that.
You can't, it was someone just dragging the camera. Show me the video.

Offline Cobra!

  • Antweight
  • Posts: 51
  • Rep: 0
    • https://www.facebook.com/
    • Cobradabest
    • View Profile
    • Gamerstorm
    • Awards
  • See profile for gamer tags: Yes
  • Skype: cobradabest
Re: AI Problem/Questions
« Reply #15 on: October 12, 2012, 04:16:03 PM »
2) Was it me?  If so, I'm fighting two AI'd bots against each other and using the F10 camera to follow them.
All F10 does is change to a "Watch" camera that you can rotate with the mouse, it doesn't actually follow them.
You have to move the camera. The F10 cam lets you move it any where you want to for better viewing.
I wanted to know how you can make the camera follow an AI, similar to how the watch camera follows a player. I've seen a video by someone I knew on Youtube and seen what looked like that.
You can't, it was someone just dragging the camera. Show me the video.
I'm pretty sure it was the camera following the AI, I didn't see any mouse dragging along the screen and the camera movement was smooth, too smooth for it to be a mouse.

The video was a good few years ago, though, so I've forgotten his user name or the video title, it might have even been him controlling a robot, but then again, he used to always complain to me back then, that I didn't use AI for my Robot Arena 2 videos (I used to control all robots on the screen, which you can probably imagine, was hard, but it was fun!), and in the video(s), he always made complains to AI related things. (such as why can't an invertible robot have a srimech etc.)
I could have a look and try to dig it up, though...

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: AI Problem/Questions
« Reply #16 on: October 12, 2012, 07:49:38 PM »
Yeah see if you can find it, it sounds interesting.

Offline Cobra!

  • Antweight
  • Posts: 51
  • Rep: 0
    • https://www.facebook.com/
    • Cobradabest
    • View Profile
    • Gamerstorm
    • Awards
  • See profile for gamer tags: Yes
  • Skype: cobradabest
Re: AI Problem/Questions
« Reply #17 on: October 13, 2012, 10:34:20 AM »
I can't seem to find it... It seems the use had deleted the videos, all he has now are drawing tutorials on his channel.

I guess I'll just wait until Trovaner releases his/her "Action Cam".
« Last Edit: October 21, 2012, 07:59:47 AM by Cobra! »

Offline Cobra!

  • Antweight
  • Posts: 51
  • Rep: 0
    • https://www.facebook.com/
    • Cobradabest
    • View Profile
    • Gamerstorm
    • Awards
  • See profile for gamer tags: Yes
  • Skype: cobradabest
Re: AI Problem/Questions
« Reply #18 on: October 21, 2012, 07:59:25 AM »
Sorry for trying to resurrect an old topic here, but is there anyway at all to make pushers and rammers use weapons and srimechs? It's really starting to bug me that my pusher and rammer robots don't even try to self right when they're flipped.

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: AI Problem/Questions
« Reply #19 on: October 21, 2012, 08:07:34 AM »
It involves setting a tactic in the binding line.
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)