Ok, so I need help AIing ty4er's Tusslers 3 robot. The robot refuses to drive when AI'd even though it drives fine in the bot lab, any ideas?
Quote from: G.K. on July 12, 2013, 10:27:22 AMPut the bot and AI line up.https://gametechmods.com/uploads/files/6512Gaze.zipCode: [Select]list.append(("Gaze","Omni",{'invertible':True,'radius':0.1,'topspeed':99,'throttle':130,'turn':60,'turnspeed':2.5,'range':99,'weapons':(0,)}))
Put the bot and AI line up.
list.append(("Gaze","Omni",{'invertible':True,'radius':0.1,'topspeed':99,'throttle':130,'turn':60,'turnspeed':2.5,'range':99,'weapons':(0,)}))
I think the problem is that the arrow that tells the bot which way is facing forward is actually facing up, so the ai gets confused. I think you need a special ai, but I have no idea what would work.
index 15Hydrovian Expeditionary Force"Nondefeat through denial of victory."AI\hef.bmpRobots: 0Robot In Event: -10161600000100000true0false0-10 0 0 0 0 0 0 0 0 0 0 0 0 0 0000
list.append( ("WAHEY","VertSpinner",{'nose':math.pi*2,'invertible':False,'range':50,'radius':1,'topspeed':100,'throttle':100,'turn':100,'turnspeed':2.5,'TrollDanceZone':1,'weapons':(0,),'sweapons':(0,)}))
Oh I'll be doing some banging.......
from __future__ import generatorsimport plusimport AIfrom AI import vector3import Arenasimport Gooeyimport mathimport Tacticsclass FRWL(AI.SuperAI): "The Clamp/Spin AI for From Russia With Love!" name = "FRWL" def __init__(self, **args): AI.SuperAI.__init__(self, **args) self.tactics.append(Tactics.Charge(self)) self.tactics.append(Tactics.Shove(self)) self.spin_range = 3.0 if 'range' in args: self.spin_range = args.get('range') self.tactics.append(Tactics.Engage(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("squeeze", 1) return AI.SuperAI.Activate(self, active) def Tick(self): targets = [x for x in self.sensors.itervalues() if x.contacts > 0] if len(targets) > 0: self.Input("Clamp", 0, 100) else: self.Input("Clamp", 0, 0) if self.weapons: # spin up depending on enemy's range enemy, range = self.GetNearestEnemy() if enemy is not None and range < self.spin_range: self.Input("Spin", 0, 1) elif self.GetInputStatus("Spin", 0) != 0: self.Input("Spin", 0, 0) return AI.SuperAI.Tick(self) def RobotInRange(self, robot_id): "Return tuple of (part-of-robot-in-range, chassis-in-range)" # GetLastDamage returns: component damaged, amount, at time, by player, by component range = self.GetDistanceToID(robot_id) if range < self.spin_range: damage = self.GetLastDamageReceived() if damage[3] == robot_id and (plus.getTimeElapsed() - damage[2] < 1.0): return (True, True) return (False, False) def LostComponent(self, id): #print "Lost Component!" return AI.SuperAI.LostComponent(self, id) def LostComponent(self, id): # if we lose all our weapons, stop using the Engage 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 == "Engage"] 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) AI.register(FRWL)
Good evening, gentlemen.I seem to be having problems with my first AI. I'm running DSL 3. In an Exhibition match, the game loads fine, but when it starts the camera is pointing off somewhere else and the game crashes after 11 seconds.Here is my team code:Code: [Select]index 15Hydrovian Expeditionary Force"Nondefeat through denial of victory."AI\hef.bmpRobots: 0Robot In Event: -10161600000100000true0false0-10 0 0 0 0 0 0 0 0 0 0 0 0 0 0000And my Bindings.py line:Code: [Select] list.append(G("WAHEY","VertSpinner",{'nose':math.pi*2,'invertible':False,'range':50,'radius':1,'topspeed':100,'throttle':100,'turn':100,'turnspeed':2.5,'TrollDanceZone':1,'weapons':(0,),'sweapons':(0,)}))Any ideas?
list.append(G("WAHEY","VertSpinner",{'nose':math.pi*2,'invertible':False,'range':50,'radius':1,'topspeed':100,'throttle':100,'turn':100,'turnspeed':2.5,'TrollDanceZone':1,'weapons':(0,),'sweapons':(0,)}))
It says "sweapons" instead pf "weapons". Also, wtf is "TrollDanceZone". And I'd use Omni instead of VertSpinner. It's easier for me. You don't have to, but it would probably be easier.
list.append(("Taurus","Rammer",{'invertible':True,'nose':math.pi,'radius':0.1,'topspeed':160,'throttle':160,'turn':60,'turnspeed':2.5}))
index 15The Forgotten"Does anyone remember us?"AI\who.bmpRobots: 0 1 2Robot In Event: -10161600000100000true0false0-10 0 0 0 0 0 0 0 0 0 0 0 0 0 0000
Is who.bmp a 128/128 24-bit bitmap?