i ai-ed a pushy bot with a snowplow that fails. it's wired correctly, it faces the right way, but this is what it does.it drives toward me, backs up, then drives staright into a corner. help?
Lower your turn speed, you probably have it too high..What is it?
hmm.. what is the turn value?30is the robot fast to drive too?It has NPCF IIRC
NPCF doesnt help much :P what weightclass?
obligatory battlebots 5 comment
What's the radius? That always seems to help me.
Quote from: freeziez on August 21, 2011, 12:28:37 PMWhat's the radius? That always seems to help me.I believe .5
Quote from: Preytor_4 on August 21, 2011, 12:31:10 PMQuote from: freeziez on August 21, 2011, 12:28:37 PMWhat's the radius? That always seems to help me.I believe .5Try lowering it to .2
from __future__ import generatorsimport plusimport AIfrom AI import vector3import Arenasimport Gooeyimport mathimport Tacticsclass Jumper(AI.SuperAI): "AI that leaps onto the opponent to attack, then backs up." name = "Jumper" def __init__(self, **args): AI.SuperAI.__init__(self, **args) self.zone1 = "Zone1" self.zone2 = "Zone2" self.zone3 = "leap" self.triggers1 = ["Leap"] self.botinzone1 = 0 self.botinzone2 = 0 self.backupFunction = self.Backup if 'zone1' in args: self.zone1 = args['zone1'] if 'zone2' in args: self.zone2 = args['zone2'] if 'leap2' in args: self.triggers1 = args['leap2'] self.tactics.append(Tactics.Ram(self)) def Activate(self, active): if active: if AI.SuperAI.debugging: self.debug = Gooey.Plain("watch", 0, 75, 100, 75) tbox = self.debug.addText("line0", 0, 0, 100, 15) tbox.setText("Throttle") tbox = self.debug.addText("line1", 0, 15, 100, 15) tbox.setText("Turning") tbox = self.debug.addText("line2", 0, 30, 100, 15) tbox.setText("") tbox = self.debug.addText("line3", 0, 45, 100, 15) tbox.setText("") self.RegisterSmartZone(self.zone1, 1) self.RegisterSmartZone(self.zone2, 2) self.RegisterSmartZone(self.zone3, 3) else: # get rid of reference to self self.backupFunction = None return AI.SuperAI.Activate(self, active) def Tick(self): bReturn = AI.SuperAI.Tick(self) # call this now so it takes place after other driving commands if self.backupFunction: self.backupFunction(len(targets) > 0) return bReturn def Backup(self, bTarget): # back up if a bot gets under us (I ripped this from Arrowhead, sorry madiba) if self.botinzone1 == 1: self.Throttle(0) self.Input("Fire1", 0, 100) else: self.Input("Fire1", 0, 0) if self.botinzone2 == 1: self.Throttle(0) self.Input("Fire2", 0, 100) else: self.Input("Fire2", 0, 0) def LostComponent(self, id): # if we lose all our weapons, stop using the Ram tactic and switch to Shove if id in self.weapons: self.weapons.remove(id) if not self.weapons: tactic = [x for x in self.tactics if x.name == "Ram"] if len(tactic) > 0: self.tactics.remove(tactic[0]) self.tactics.append(Tactics.Shove(self)) self.tactics.append(Tactics.Charge(self)) return AI.SuperAI.LostComponent(self, id) def DebugString(self, id, string): if self.debug: if id == 0: self.debug.get("line0").setText(string) elif id == 1: self.debug.get("line1").setText(string) elif id == 2: self.debug.get("line2").setText(string) elif id == 3: self.debug.get("line3").setText(string) def SmartZoneEvent(self, direction, id, robot, chassis): if id == 1: if robot > 0: if direction == 1: self.botinzone1 = 1 if direction == -1: self.botinzone1 = 0 elif id == 2: if robot > 0: if direction == 1: self.botinzone2 = 1 if direction == -1: self.botinzone2 = 0 elif id == 3: if robot > 0: if direction == 1: for trigger in self.triggers1: self.Input(trigger, 0, 1) return True AI.register(Jumper)
DP: Something weird happening. I just AI'd a spinner and it won't spin! The control is named"Spin", it's a button, it works under human control. The bot uses Spinner.py and has a ranfe of 99. Yet the weapon doesn't spin under AI. I must be missing something obvious here.
I think SM is a pretty cool guy, eh builds unicycle-bots and doesn't afraid of anything
Quote from: Squirrel_Monkey on August 18, 2011, 11:26:20 AMDP: Something weird happening. I just AI'd a spinner and it won't spin! The control is named"Spin", it's a button, it works under human control. The bot uses Spinner.py and has a ranfe of 99. Yet the weapon doesn't spin under AI. I must be missing something obvious here.Anyone got any help?
index 36NC's creatures"Crunch, gnaw and claw"AI\oldies.bmpRobots: 0Robot In Event: -10161600000100000true0false0-10 0 0 0 0 0 0 0 0 0 0 0 0 0 0000
list.append(("The Troll5","Omni",{'radius':0.1,'topspeed':99,'throttle':130,'turn':30,'weapons':(1,2,3,4)}))