This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - System32
2261
« on: December 16, 2009, 04:31:38 PM »
Heh, the problem was in the test bots!
2262
« on: December 16, 2009, 12:09:51 PM »
Magic.
That, and the # button in reply mode.
2263
« on: December 16, 2009, 11:41:50 AM »
New problem: Won't turn!
from __future__ import generators import plus import AI from AI import vector3 import Arenas import Gooey import math import Tactics class Cheap(AI.SuperAI): # "Like Omni, but waits for chassis contact before firing the weapon. If chassis is not found by a certain time, then fires anyway. it also attacks from the side, like the Plow AI." # Use variable 'NoChassisTime' in Bindings.py to set the amount of time in seconds the AI will wait to find the chassis before giving up and firing, when there are components in the smart zone. name = "Cheap" def __init__(self, **args): AI.SuperAI.__init__(self, **args) self.zone1 = "weapon" self.triggers1 = ["Fire"] self.triggers2 = ["Srimech"] self.botinzone = 0 self.compinzone = 0 self.comptimer = 0 self.NoChassisTime = 4 if 'zone' in args: self.zone = args['zone'] if 'triggers' in args: self.triggers1 = args['triggers'] if 'triggers' in args: self.triggers2 = args['triggers'] if 'NoChassisTime' in args: self.NoChassisTime = args.get('NoChassisTime') * 4 self.tactics.append(Tactics.Shove(self)) self.tactics.append(Tactics.Charge(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) return AI.SuperAI.Activate(self, active) def Tick(self): # fire weapon targets = [x for x in self.sensors.itervalues() if x.contacts > 0 \ and not plus.isDefeated(x.robot)] # if a component is in the smart zone but not the chassis, wait to find chassis before firing weapons if self.compinzone == 1 and self.botinzone == 0: self.comptimer += 1 if self.botinzone == 1: self.comptimer = 0 if self.weapons and (self.botinzone == 1 or (self.comptimer >= self.NoChassisTime and self.compinzone == 1)): for trigger in self.triggers1: self.Input(trigger, 0, 1) bReturn = AI.SuperAI.Tick(self) return bReturn def InvertHandler(self): # fire all weapons once per second (until we're upright!) while 1: for trigger in self.triggers2: self.Input(trigger, 0, 1) for i in range(0, 8): yield 0 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 == "Charge"] if len(tactic) > 0: self.tactics.remove(tactic[0]) self.tactics.append(Tactics.Shove(self)) return AI.SuperAI.LostComponent(self, id) def Disable(self, btarget): # Disables opponent by charging it at an angle # we use a different angle (depending on the size of the opponent!) # if target is equal in size, the plow weapon charges are more direct if btarget > self: self.Turn(79) else: self.Turn(-79) if btarget < self: self.Turn(35) else: self.Turn(-35) if btarget == self: self.Turn(90) else: self.Turn(-90) if self.target: self.Turn(360) return AI.SuperAI.Disable(self, btarget) 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 and self.weapons: if robot > 0: if direction == 1: self.compinzone = 1 if chassis: self.botinzone = 1 if direction == -1: self.compinzone = 0 if chassis: self.botinzone = 0 return True AI.register(Cheap)
2264
« on: December 16, 2009, 10:18:03 AM »
This is a perfect oppertunity to test my "Cheap" .py!
2265
« on: December 16, 2009, 09:23:09 AM »
Yeah there were quite a few errors. I fixed them (I think...).
2266
« on: December 16, 2009, 07:16:00 AM »
Dawn sucks!
wait, that ain't right...
2267
« on: December 15, 2009, 05:03:08 PM »
There is a space between the period and the next word you know.
Looking at that post, there isn't.
2268
« on: December 15, 2009, 12:04:23 PM »
2269
« on: December 15, 2009, 11:29:40 AM »
Yes. And I accidentally applied plastic. DOH!
2270
« on: December 14, 2009, 06:57:57 PM »
I can do it, I'll just need to reshape the chassis...
Edit: Ok, RAD's are acting wonky. 249.2 KG. GAH.
2271
« on: December 14, 2009, 05:47:25 PM »
^^ WINNAR ^^
2272
« on: December 14, 2009, 05:26:42 PM »
Created a new AI:
from __future__ import generators import plus import AI from AI import vector3 import Arenas import Gooey import math import Tactics class Popup(AI.SuperAI): "Like Plow, but waits for chassis contact before firing the weapon. If chassis is not found by a certain time, then fires anyway." # Use variable 'NoChassisTime' in Bindings.py to set the amount of time in seconds the AI will wait to find the chassis before giving up and firing, when there are components in the smart zone. name = "CheapPopup" def __init__(self, **args): AI.SuperAI.__init__(self, **args) self.zone1 = "weapon" self.triggers1 = ["Fire"] self.triggers2 = ["Srimech"] self.botinzone = 0 self.compinzone = 0 self.comptimer = 0 self.NoChassisTime = 8 if 'zone' in args: self.zone = args['zone'] if 'triggers' in args: self.triggers1 = args['triggers'] if 'triggers' in args: self.triggers2 = args['triggers'] if 'NoChassisTime' in args: self.NoChassisTime = args.get('NoChassisTime') * 4 self.tactics.append(Tactics.Engage(self)) self.tactics.append(Tactics.Charge(self)) self.tactics.append(Tactics.Shove(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) return AI.SuperAI.Activate(self, active) def Tick(self): # fire weapon targets = [x for x in self.sensors.itervalues() if x.contacts > 0 \ and not plus.isDefeated(x.robot)] # if a component is in the smart zone but not the chassis, wait to find chassis before firing weapons if self.compinzone == 1 and self.botinzone == 0: self.comptimer += 1 if self.botinzone == 1: self.comptimer = 0 if self.weapons and (self.botinzone == 1 or (self.comptimer >= self.NoChassisTime and self.compinzone == 1)): for trigger in self.triggers1: self.Input(trigger, 0, 1) bReturn = AI.SuperAI.Tick(self) return bReturn def InvertHandler(self): # fire all weapons once per second (until we're upright!) while 1: for trigger in self.triggers2: self.Input(trigger, 0, 1) for i in range(0, 8): yield 0 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 Disable(self,btarget): # Disables opponent by charging it at an angle # we use a different angle (depending on the size of the opponent!) # if target is equal in size, the plow weapon charges are more direct if btarget > self: self.Turn(79) else: self.Turn(-79) if btarget < self: self.Turn(35) else: self.Turn(-35) if btarget == self: self.Turn(90) else: self.Turn(-90) if self.target: self.Turn(360) return AI.SuperAI.Disable(self, btarget) 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 and self.weapons: if robot > 0: if direction == 1: self.compinzone = 1 if chassis: self.botinzone = 1 if direction == -1: self.compinzone = 0 if chassis: self.botinzone = 0 return True AI.register(CheapPopup) Problem: Crashes RA2, and I don't know how. Help?
2273
« on: December 13, 2009, 01:39:50 PM »
bid $1250.01 then.
2274
« on: December 13, 2009, 10:24:59 AM »
key word: USED.
That barrel could be blocked or ANYTHING.
2275
« on: December 13, 2009, 08:40:57 AM »
:O has anyone noticed there is a curse on tourneys and computer problems at the moment ?
I noticed it first!!!
2276
« on: December 13, 2009, 05:41:42 AM »
Honestly I was planning to add a ballast to stop it going to high when it drives over a ramp. I'll look onto your ideas... Edit: new bot! Feelkon:  6 Maces, Plastic... Heh, If I use razors and 2 anchors instead of that T connector I could get a plow. But I like this the way it is. Trivia: This is a chassis for a BW.
2277
« on: December 12, 2009, 05:06:21 PM »
Not for going under the bridge!
2278
« on: December 12, 2009, 03:44:30 PM »
HAY U GUYZ, REMEMBAH DIS: (Image removed from quote.) Well, I improved it:  How, you ask? It's not a Bot thumping VS like they should be. Well, Everyone tests bots in "flat" arenas like the combat zone, so to be different I've begun stesting my bots on a "different" set of arenas. The half circle, luma zone, bridge of doom and compressor, to be exact. (IMMA REBAL!!!) You see, the classic idea of a good bot is a fast gutripper that speeds across the arena and knocks the opponent to bits before it realises the match started. or a very large HS that swollows the opponents remains like a pissed off blender. I however, thought of going for a different approach. Bots that battle in unpredictable arenas like the BoD, where VS can get trapped and HS are too wide to spin. Ramps like those in the compressor, where popups get wedged in and become immobile, and plenty of hazards. I'll be building a series of bots that are made to win in these hectic arenas. Sure, a face off in the combat arena may make them look weak, but a duel in the luma zone? Say goodbye.
2279
« on: December 12, 2009, 11:46:32 AM »
perhaps a n00b warz showcase's for people to constantly showcase old robots ithout the expectation of comments to improve them or call them stupid ? Nayar, Don't kill yourself, he's only joking!
2280
« on: December 12, 2009, 06:47:00 AM »
Can we also see the insides of the walker?
|