Author Topic: AI-ing (.py files, coding, nose-orienting R+D, and help)  (Read 235767 times)

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #920 on: August 29, 2011, 06:04:34 PM »
Alright, I got it to work with FBSPlus.py (is this the best version?), but there's one flaw: since my battery capacity is quite low the bot will decrease in spin speed dramatically during the fight. This AI file only takes one parameter, spinspeed, to see if the bot already is spinning fast enough before prioritizing moving to the enemy. So, at the end of the fight my bot just sits there spinning and doesn't attack whatsoever.

Is there a way to find out battery power (like self.GetBattery() or something) in the AI Python script? If there is I can brew something myself.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #921 on: August 30, 2011, 12:58:02 PM »
There are no easy ways of checking the battery power using python. Your best bet is to either make a rough formula (with a binding for the amount of power and drain) or have the spinspeed decline over time (with a binding for the rate of decline).

Unfortunately, the drain isn't always linear so these methods aren't always accurate. There might be a way to use the sergepatcher as a means of looking up a specific value but it might be more trouble than its worth.

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #922 on: August 30, 2011, 02:41:30 PM »
Alright, I just added two paremeters:

drain
draintime

It basically substracts "drain" from "spinspeed" gradually in a linear way during "draintime" ending in "spinspeed"-"drain".

Offline Mr. AS

  • TheGloriousCarbideArstotzkanIronsideChaosProtocol
  • *
  • Posts: 7557
  • Rep: 19
    • robotarenagtm
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #923 on: September 04, 2011, 06:26:48 AM »
I'm trying to AI a pop-up for RPJK's AI pack, and when a match is started, it avoids the enemy (drives directly into the wall)
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)}))

I can replace omni with popup.py if it's needed.
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 nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #924 on: September 04, 2011, 06:33:07 AM »
My guess is that the nose is wrong. Try deleting the 'nose':math.pi,.

Offline Mr. AS

  • TheGloriousCarbideArstotzkanIronsideChaosProtocol
  • *
  • Posts: 7557
  • Rep: 19
    • robotarenagtm
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #925 on: September 04, 2011, 06:35:26 AM »
Worked. Thanks NC.
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 JoeBlo

Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #926 on: September 05, 2011, 06:19:25 AM »
For future Info, Deleting it doesnt always fix the problem, it just makes the robot use the default which is

'nose':math.pi*2

The 4 common building directions are..

'nose':math.pi*2
'nose':math.pi
'nose':math.pi/2
'nose':-math.pi/2

If you build with your robots using the top of the Blueprint as the front of the robot you only need 'nose':math.pi*2

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #927 on: September 05, 2011, 07:56:28 AM »
Oh, and before you go like why math.pi and stuff, read this: http://en.wikipedia.org/wiki/Radian

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-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #928 on: September 12, 2011, 07:23:01 PM »
I got a question, what pythonshould I use for Torque reaction hammer bots?

Offline Clickbeetle

  • *
  • Posts: 3375
  • Rep: 21
  • In Soviet Russia, bugs stomp YOU!
  • Awards BOTM Winner
    • View Profile
    • Beetle Bros site
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #929 on: September 21, 2011, 09:43:13 PM »
It's a crawler right?
 
If so, then TRFBD.py should work.  It has a feature that makes the AI drive back and forth when the enemy is in a certain range, which on a TR hammer would make the hammer swing.

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 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-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #930 on: September 24, 2011, 02:20:22 PM »
Thanks Click.

Offline Preytor_4

  • Ultra Heavyweight
  • Posts: 3089
  • Rep: 1
  • The estranged cousin of Click and FB.
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #931 on: November 01, 2011, 07:39:12 PM »
How would I AI this:


There is no control board and therefore no controls.

Offline Mr. AS

  • TheGloriousCarbideArstotzkanIronsideChaosProtocol
  • *
  • Posts: 7557
  • Rep: 19
    • robotarenagtm
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #932 on: November 01, 2011, 07:42:12 PM »
How would I AI this:
(Image removed from quote.)

There is no control board and therefore no controls.
you add a control board
or you just make it a sitting duck with nobrain.py, iirc.
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 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-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #933 on: November 01, 2011, 09:01:49 PM »
It's for Steel Warzone though and he can's really edit a competitor's bot so, I guess you'll have to use nobrain.

Offline R0B0SH4RK

  • *
  • Posts: 1807
  • Rep: 8
  • There is epic to my madness.
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #934 on: November 02, 2011, 04:29:05 PM »
Was skimming this thread, figured I might as well upload this nose orientaiton guide I made a while ago. Hope this helps someone.


Offline JoeBlo

Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #935 on: November 03, 2011, 08:50:20 AM »
nice stuff R0B0... should be a huge help to those starting out

Offline yoda9726

  • Heavyweight
  • Posts: 538
  • Rep: 5
  • You can't really dust for vomit
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #936 on: November 04, 2011, 04:17:23 PM »
God, I hate to do this, but can I get some help Ai'ing this bot?  Everything I'm trying is failing miserably. 
 
https://gametechmods.com/uploads/files/HoverVore.rar
 
All help is appreciated.
Survival of the Fittest Is Finished!  Congratulations 090901

Offline Squirrel_Monkey

  • Squirrel_Monkeyweight
  • *
  • Posts: 7587
  • Rep: 7
  • [Insert clever and witty comment here]
    • 0SquirrelMonkey0
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #937 on: November 04, 2011, 04:21:11 PM »
InMyArms2.py might work if you take a look at it.
Better than GK since 2009.
I think SM is a pretty cool guy, eh builds unicycle-bots and doesn't afraid of anything

Offline yoda9726

  • Heavyweight
  • Posts: 538
  • Rep: 5
  • You can't really dust for vomit
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #938 on: November 04, 2011, 11:50:10 PM »
been trying.  Servo never moves at all. Can you guys double check me, please?  I've got the servo wired to an analog named Servo, and the smartzone is labeled as servozone.  Here's the bindings, values aren't exact yet, i'm just currently trying to get it to work at all....


   


Code: [Select]
    list.append(("HoverVore","InMyArms2",'nose':math.pi*2,'servodelta':0.15,'servospeed':100,'servonose':1,'servoopenangle':10,'servocloseangle':0.5,'range':99,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':5,'weapons':(2,)}))
Survival of the Fittest Is Finished!  Congratulations 090901

Offline Preytor_4

  • Ultra Heavyweight
  • Posts: 3089
  • Rep: 1
  • The estranged cousin of Click and FB.
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #939 on: November 05, 2011, 08:30:52 AM »
Finally finished AIing, but these 2 bots crash my game:

Code: [Select]
list.append(("Return To Sender","FBSPlus",{'nose':math.pi,'spinspeed':7,'range':99,'radius':0.1,'topspeed':99,'throttle':130,'turn':70,'turnspeed':4,'weapons':(20,21,22,23,24,25,26)}))
    list.append(("Ion-","FBSPlus",{'nose':math.pi,'spinspeed':7,'range':99,'radius':0.1,'topspeed':99,'throttle':130,'turn':70,'turnspeed':4,'weapons':(20,21,22,23,24,25,26)}))

Yes, I have FBSPlus

There is 4 spaces, just didn't copy it.

It crashes when I start the match. It gives me this error:



(yes this is in the SW-SBV  thread, but thats not really where it belongs)