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

Offline RedAce

  • Host of The Award Winning Deathmatch Series
  • *
  • Posts: 3966
  • Rep: 21
  • Yep, I'm that RedAce guy.
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
  • Skype: redaceofsp4des
  • Discord: ThatRedAceGuy#3618
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1120 on: February 10, 2015, 02:27:28 PM »
Could you put 0 in the weapons category? Will that do anything? If not, then I've got no clue.

Offline Naryar

  • Posts: 23283
  • Rep: 21
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1121 on: February 10, 2015, 03:30:12 PM »
The bindings are just fine and weapon value doesn't matter.

It's either the weapon control which is named wrong (check for spaces!), either the weapon itself that is not wired/poorly wired.

Or maybe it is one of these bots that do not work even if there is nothing wrong with the AI. Sometimes ra2 does that, so just AI it again.

Offline Badnik96

  • tired of your shit
  • *
  • Posts: 17537
  • Rep: 3
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1122 on: February 10, 2015, 04:11:21 PM »
Is there another robot in your AI with the same name? That causes problems IIRC.

Offline P3PSl

  • Antweight
  • Posts: 102
  • Rep: 0
  • Sorry we don't have Coke here, is Pepsi okay?
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1123 on: February 14, 2015, 07:03:05 PM »
What would the code be for eternalflame.py?

Offline 090901

  • alcoholic in denial
  • *
  • Posts: 7006
  • Rep: 22
  • :mrgreen:
  • Awards Donated money for site hosting 2019 GTMCS2 Divison Winner GTMCS Division Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1124 on: February 14, 2015, 07:13:38 PM »
What would the code be for eternalflame.py?
Code: [Select]
list.append(("Enter Bot Name","EternalFlame",{'invertible':True,'flame_range':99,'radius':0.1,'throttle':130,'topspeed':99,'turn':50,'turnspeed':2,'weapons':(0,)}))

Offline P3PSl

  • Antweight
  • Posts: 102
  • Rep: 0
  • Sorry we don't have Coke here, is Pepsi okay?
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1125 on: February 14, 2015, 07:13:58 PM »
Thank You :D

Offline 090901

  • alcoholic in denial
  • *
  • Posts: 7006
  • Rep: 22
  • :mrgreen:
  • Awards Donated money for site hosting 2019 GTMCS2 Divison Winner GTMCS Division Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1126 on: February 14, 2015, 07:15:23 PM »
Thank You :D
Make sure you have an analog control connected to the flamethrower called "Flame" too

Offline Naryar

  • Posts: 23283
  • Rep: 21
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1127 on: February 16, 2015, 12:29:01 PM »
And so the Forward input is wired to flame. The backward input can be let empty.

Offline TakionKasukedo

  • Antweight
  • Posts: 6
  • Rep: 0
  • The Cascade corrodes all that stand in it's way.
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1128 on: February 20, 2015, 11:56:49 AM »
I cannot seem to play Robot Arena 2 DSL with any of my AI Teams, they don't replace any other robots in the game, it always ends up in a crash or error.

As you can imagine, it's very annoying.

DSL version is 2.2
"All that stand in Takion's way shall be corroded and torn apart by gravity itself. Gravity is not to be trifled with, and neither is tachyon energy. FEAR THE CASCADE."

Words of TakionKasukedo, Embodiment of Defilement.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1129 on: February 20, 2015, 01:18:32 PM »
When patching your game, you need to overwrite everything. Skipping or renaming doesn't work.

Offline TheUnknownRobotics

  • UnknownMartin
  • Heavyweight
  • Posts: 577
  • Rep: -4
  • Sm4sh NNID: Nixtram
    • http://www.youtube.com/ch
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
AI help?
« Reply #1130 on: March 31, 2015, 07:32:42 PM »
SOLVED

Code: [Select]
import math

def load(list):
    print "Loading AI bindings"

    # binding format:
    # ( 'name of robot from .bot file', 'name of AI from script class',
    #       {'optional constructor parameter':value, 'another':value} )

    # constructor parameters:
    # 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)

    # 0 - Finished "That's where your bot will be after ten seconds with ours!"
    list.append(("A Torner","Spinner",{'nose':math.pi*2,'radius':0.1,'topspeed':100,'throttle':100,'turn':30,'turnspeed':5,'weapons':(8,9)}))
    list.append(("Assassin The Finest","DirectionalSpinner",{'invertible':True,'nose':math.pi*2,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':5,'weapons':(13,14,16,17,18)}))
    list.append(("Bang Bang","Rammer",{'nose':math.pi*2,'range':99,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':5,'weapons':(18,19)}))
    list.append(("Bashur","DirectionalSpinner",{'nose':math.pi,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(25,)}))
    list.append(("Beast","DirectionalSpinner",{'nose':math.pi,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(4,)}))
    list.append(("Bolt","Rammer",{'invertible':False,'nose':math.pi,'range':99,'radius':0.1,'topspeed':100,'throttle':80,'turn':25,'turnspeed':1.5,'weapons':(20,)}))

    # 1 - Finished "Badder and still bloodthirsty!"
    list.append(("Clusterbot Spinnys","DirectionalSpinner",{'nose':math.pi,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5}))
    list.append(("Crank Dat Spine","Whipper",{'invertible':True,'nose':math.pi*2,'radius':0.2,'topspeed':100,'throttle':130,'turn':60,'turnspeed':3.5,'weapons':(10,11,12,13,14,15,16,17,18,19)}))
    list.append(("Cypher","DirectionalSpinner",{'invertible':True,'nose':math.pi*2,'range':500,'radius':1,'topspeed':3,'throttle':130,'turn':60,'turnspeed':5,'weapons':(27,28,29,30,35,36,37,38,39,40,41,42,43,44,45,46,47,48,53,54)}))
    list.append(("DarkNight","Rammer",{'nose':math.pi,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5}))
    list.append(("Destiny Is Final","DirectionalSpinner",{'nose':math.pi,'radius':0.1,'range':99,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(24,25,26)}))
    list.append(("Flatire","DirectionalSpinner",{'nose':math.pi,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(6,23)}))

    # 2 - Finished "Don't need nuthin' but my truck, my shotgun, my new bots, and my REVENGE!"
    list.append(("Force","DirectionalSpinner",{'nose':math.pi*2,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5}))
    list.append(("Foul Lem","DirectionalSpinner",{'nose':math.pi*2,'radius':.1,'range':99,'topspeed':100,'throttle':130,'turn':60,'turnspeed':3,'weapons':(3,4,5,6)}))
    list.append(("Frightener","Poker",{'nose':math.pi*2,'range':99,'radius':0.1,'topspeed':100,'throttle':130,'turn':30,'turnspeed':3,'weapons':(22,23,24,25)}))
    list.append(("Fwacker","DirectionalSpinner",{'nose':math.pi,'radius':0.1,'range':99,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(17,)}))
    list.append(("Harmless","Poker",{'invertible':True,'nose':math.pi,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(6,)}))
    list.append(("Lavra","DirectionalSpinner",{'invertible':True,'nose':math.pi*2,'radius':1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(11,),'sweapons':(28,29,)}))

    # 3 - Finished "If you defeat us again, we will sneak in at night and steal your bots."
    list.append(("No Mercy 4 U","Poker",{'nose':math.pi*2,'range':99,'radius':0.1,'range':99,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2,'weapons':(4,5)}))
    list.append(("Nothing Is Everything But Me","DirectionalSpinner",{'nose':math.pi*2,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':3.5,'weapons':(9,10)}))
    list.append(("Red Brawler","DirectionalSpinner",{'invertible':True,'nose':math.pi*2,'range':99,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':1,'weapons':(13,14,15,16)}))
    list.append(("Slam and Dank","Rammer",{'invertible':True,'radius':0.3,'range':2.5,'topspeed':100,'throttle':130,'turn':60,'turnspeed':3,'weapons':(25,)}))
    list.append(("Slam and Dank (Thwack)","Whipper",{'invertible':True,'nose':math.pi,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(19,)}))
    list.append(("Slice and Dice 'em","DirectionalSpinner",{'radius':0.1,'range':99,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(55,)}))

    # 4 - Finished "The BLACK STORM was only getting started with our old bots!"
    list.append(("SpamYou","Spinner",{'nose':math.pi*2,'radius':0.1,'range':99,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(19,)}))
    list.append(("Spikez","DirectionalSpinner",{'nose':math.pi*2,'radius':0.1,'range':99,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2}))
    list.append(("Stein","Poker",{'nose':math.pi*2,'radius':0.1,'range':99,'topspeed':150,'throttle':130,'turn':60,'turnspeed':4,'weapons':(29,41,42)}))
    list.append(("Tetsuke","Poker",{'nose':math.pi,'radius':0.1,'range':99,'topspeed':100,'throttle':130,'turn':25,'turnspeed':3,'weapons':(7,)}))
    list.append(("Toart","DirectionalSpinner",{'invertible':True,'nose':math.pi,'radius':0.1,'range':99,'topspeed':6,'throttle':60,'turn':60,'turnspeed':2.5,'weapons':(15,)}))
    list.append(("Uproar","Flipper",{'invertible':False,'nose':math.pi,'range':99,'radius':0.1,'topspeed':100,'throttle':130,'turn':30,'turnspeed':3,'weapons':(25,29)}))

    # 5 - Finished "EMERGENCY is back with a vengeance, faster and more furious."
    list.append(("WeSpin","Spinner",{'nose':math.pi*2,'radius':0.1,'range':99,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(12,)}))
    list.append(("Yayuia","Spinner",{'nose':math.pi*2,'radius':0.1,'topspeed':100,'throttle':130,'turn':130,'turnspeed':5,'weapons':(12,17)}))
« Last Edit: April 01, 2015, 10:55:23 PM by Trovaner »
Mostly a lurker and Sm4sh Bros. player nowadays. :3

Offline RedAce

  • Host of The Award Winning Deathmatch Series
  • *
  • Posts: 3966
  • Rep: 21
  • Yep, I'm that RedAce guy.
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
  • Skype: redaceofsp4des
  • Discord: ThatRedAceGuy#3618
Re: AI help?
« Reply #1131 on: March 31, 2015, 07:39:21 PM »
Can you be a little more specific than "Something is off"? They look just fine and should work as well.

Offline Naryar

  • Posts: 23283
  • Rep: 21
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1132 on: March 31, 2015, 07:45:25 PM »
topic merged with ai topic.

Offline TheUnknownRobotics

  • UnknownMartin
  • Heavyweight
  • Posts: 577
  • Rep: -4
  • Sm4sh NNID: Nixtram
    • http://www.youtube.com/ch
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1133 on: March 31, 2015, 07:47:06 PM »
topic merged with ai topic.
Thx Nary.

@Redace, I open the program, and it seems to crash. I found a few mistake, but it still doesn't open. Every name has been checked and is put in correctly.
Mostly a lurker and Sm4sh Bros. player nowadays. :3

Offline Mr. AS

  • TheGloriousCarbideArstotzkanIronsideChaosProtocol
  • *
  • Posts: 7558
  • Rep: 19
    • robotarenagtm
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1134 on: March 31, 2015, 07:49:08 PM »
5 turnspeed is way too high for anything that isn't a SnS. Look at some other AI lines (like the ones in Starcore AI v4).

You can also just copy+paste other AI lines and edit the number values and name to lower the chances of it crashing.
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 TheUnknownRobotics

  • UnknownMartin
  • Heavyweight
  • Posts: 577
  • Rep: -4
  • Sm4sh NNID: Nixtram
    • http://www.youtube.com/ch
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1135 on: March 31, 2015, 07:52:17 PM »
5 turnspeed is way too high for anything that isn't a SnS. Look at some other AI lines (like the ones in Starcore AI v4).

You can also just copy+paste other AI lines and edit the number values and name to lower the chances of it crashing.
Okay (I took these from the DSL, btw). Thanks. Is that what makes the game crash before I can even enter the game?
Dangit, it didn't work. I'm still not sure what's making the game crash right away.
Mostly a lurker and Sm4sh Bros. player nowadays. :3

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-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1136 on: March 31, 2015, 08:04:23 PM »
Have you tried just wiping the offending line and starting from scratch?  When you can't solve the problem with a toothpick, a sledgehammer is the next-best thing.

Offline TheUnknownRobotics

  • UnknownMartin
  • Heavyweight
  • Posts: 577
  • Rep: -4
  • Sm4sh NNID: Nixtram
    • http://www.youtube.com/ch
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1137 on: March 31, 2015, 08:16:57 PM »
Have you tried just wiping the offending line and starting from scratch?  When you can't solve the problem with a toothpick, a sledgehammer is the next-best thing.
Okay, I'll see what I can do with this. Right now, I'm testing team by team. Sadly, I'm in need of sleep. So hopefully after school, It'll be resolved (Teams 0 and 1 are working, just not the nose). BTW, one of my robots goes in circles. Is that because of the controls (though I'm sure through testing it worked in the garage), or is it the turn/nose?
Mostly a lurker and Sm4sh Bros. player nowadays. :3

Offline Mr. AS

  • TheGloriousCarbideArstotzkanIronsideChaosProtocol
  • *
  • Posts: 7558
  • Rep: 19
    • robotarenagtm
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1138 on: March 31, 2015, 08:21:25 PM »
5 turnspeed is way too high for anything that isn't a SnS. Look at some other AI lines (like the ones in Starcore AI v4).

You can also just copy+paste other AI lines and edit the number values and name to lower the chances of it crashing.
Okay (I took these from the DSL, btw). Thanks. Is that what makes the game crash before I can even enter the game?
Dangit, it didn't work. I'm still not sure what's making the game crash right away.
Amping your turnspeed up too high won't crash your game. Only way I could imagine the turnspeed number crashing your game is if you put it at some stupidly high number, like 999 billion. What's more likely to cause the crash is a misplaced or omitted comma. If you're using notepad++ you might want to turn off auto-indent too, that'll screw your bindings over easily.
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 TheUnknownRobotics

  • UnknownMartin
  • Heavyweight
  • Posts: 577
  • Rep: -4
  • Sm4sh NNID: Nixtram
    • http://www.youtube.com/ch
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1139 on: April 01, 2015, 04:58:18 PM »
Thankfully, I fixed the problem. I noticed 2 brackets were missing for Lavra.
However, I got one last, easy problem that I can't fix for some reason. "Force" turns on his weapon when the robot goes to them, not automatically in the beginning. I tried putting a Range of 99, 50, taking out range, and even changing DirectionalSpinner to Spinner. I don't know what else I could do. Any help for this. (I am sorry for asking too many things. Hopefully this won't affect me if I ever do a Tourney).
Mostly a lurker and Sm4sh Bros. player nowadays. :3