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

Offline Naryar

  • Posts: 23278
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #480 on: April 30, 2010, 01:39:20 AM »
I am having issues with the py i made yesterday for my Trinity SnS

https://gametechmods.com/uploads/files/FBSTrinityInvertDir.rar

AKA a mix between Poker and FBSInvertDir.

Offline JoeBlo

Re: AI-ing (.py files, coding, R+D, and help)
« Reply #481 on: April 30, 2010, 03:04:42 AM »
explain the issues ?

I cant look at it right now as im about to duck off the work but can get back to you

Offline Madiaba

Re: AI-ing (.py files, coding, R+D, and help)
« Reply #482 on: April 30, 2010, 05:17:45 PM »
What is the AI.py supposed to do?  ^^Yea, explain a bit, please.^^
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline Naryar

  • Posts: 23278
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #483 on: April 30, 2010, 05:41:23 PM »
FBSInvertDir with poker support. Like my recently showcased HW.

O wait i could nearly use Topknot.py for this !!

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #484 on: May 01, 2010, 10:32:47 AM »
Here's PinnerPlus.py, Pinner with added support for a spinning weapon:

Code: [Select]
from __future__ import generators
import plus
import AI
from AI import vector3
import Arenas
import Gooey
import math
import Tactics

class PinnerPlus(AI.SuperAI):
    "Pushes without backing up"
    name = "PinnerPlus"
    # Designed for true pushers, though does NOT back up repeatedly like Pusher.py does. This has a spin function too.
    # In-built average Throttle, Topspeed, Turn and Turnspeed values for easier AI-ing. Also invertible.
    # Brought to you by G.K.
    def __init__(self, **args):
        AI.SuperAI.__init__(self, **args)
       
        self.tactics.append(Tactics.Engage(self))
       
    self.max_Throttle = 130
    self.top_speed = 99
    self.bInvertible = True
    self.max_turn = 40
    self.max_turn_speed = 3
        self.spin_range = 40.0
       
        if 'range' in args:
            self.spin_range = args.get('range')       
       

    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("")
           
        return AI.SuperAI.Activate(self, active)

    def Tick(self):
        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 LostComponent(self, id):
        #print "Lost Component!"
        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(PinnerPlus)

https://gametechmods.com/uploads/files/PinnerPlus.zip
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

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, R+D, and help)
« Reply #485 on: May 01, 2010, 10:34:40 AM »
print "Lost Component!"
Wazzat mean?
Better than GK since 2009.
I think SM is a pretty cool guy, eh builds unicycle-bots and doesn't afraid of anything

Offline Naryar

  • Posts: 23278
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #486 on: May 01, 2010, 10:41:27 AM »
Here's PinnerPlus.py, Pinner with added support for a spinning weapon:

Why are you even bothering... Omni works nearly the same way.

Plus pinners with spinning weapons (should be called SPinners, har har har) aren't even pinners, since when pinning they immobilize their spinners as well.


Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #487 on: May 01, 2010, 10:42:00 AM »
SM asked me to make it.
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline JoeBlo

Re: AI-ing (.py files, coding, R+D, and help)
« Reply #488 on: May 01, 2010, 10:43:08 AM »
@S_M: python will not read that line since it has a # at the start so its just a note.

that whole section if for handling a change of tactic shoudl the robot loose its designated components (the weapon: numbers in the binding line)

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, R+D, and help)
« Reply #489 on: May 07, 2010, 07:56:23 PM »
You know that Omni does the exact same thing as Pinner right?
 
Just use Omni and don't wire any controls and you've got yourself a Pinner.  Wire a spinner control and you've got yourself a PinnerPlus.

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 G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #490 on: May 08, 2010, 02:18:15 AM »
Ah ok.
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline Naryar

  • Posts: 23278
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #491 on: May 08, 2010, 02:37:09 AM »
You know that Omni does the exact same thing as Pinner right?
 
Just use Omni and don't wire any controls and you've got yourself a Pinner.  Wire a spinner control and you've got yourself a PinnerPlus.

Yes, i just made pinner mainly to simplify Omni, plus to be less demanding in bindings.

EDIT: Does anyone saw the error on FBSTrinityInvertDir?

Offline Badnik96

  • tired of your shit
  • *
  • Posts: 17536
  • Rep: 3
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #492 on: May 10, 2010, 04:26:22 PM »
Code: [Select]
    list.append(("Red Dragon","Omni",{'range':99,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(11,12,13,14)}))

    # 32 - RAW
    list.append(("Cryoseism","Omni",{'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(11,)}))
    list.append(("LOL WUT","SpinupOmni",{'radius':1.2,'range':99,'spinuptime':5,'topspeed':99,'throttle':130,'turn':100,'turnspeed':1.8,'weapons':(19,20,21)}))
    list.append(("Krakatau","Omni",{'range':99,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(11,)}))
    list.append(("Steel Reign","Omni",{'invertible':True,'range':99,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(11,)}))
    list.append(("Reindeer","Pinner",{'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(11,)}))
    list.append(("Army Of One","Omni",{'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(11,)}))
does anyone see any problems with these bindings? I AI'ed them and now the game crashes :S

Offline Madiaba

Re: AI-ing (.py files, coding, R+D, and help)
« Reply #493 on: May 10, 2010, 06:26:03 PM »
When does it crash; start up, selecting a team, or bot,....?

Right off, Badnik, I can't see anything obvious with those lines.
RAR and upload your whole AI directory, and I'll help you out.
 
I might suggest to you and all that when modding the game to save yourselves from any trouble:
    1. make a BU.
    2. change only one thing at a time, then test; this way you know what is wrong.
 
 
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline Naryar

  • Posts: 23278
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #494 on: May 11, 2010, 03:19:17 AM »
I don't see anything wrong as well...

And you don't need that many values with pinner really.

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #495 on: May 11, 2010, 03:20:15 PM »
As Mad said, where does it crash?
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline Badnik96

  • tired of your shit
  • *
  • Posts: 17536
  • Rep: 3
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #496 on: May 11, 2010, 03:30:46 PM »
Crashes on startup.

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #497 on: May 11, 2010, 03:32:15 PM »
Are alll the bot files named correctly? As in Bot0, Bot1 etc...?
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline Badnik96

  • tired of your shit
  • *
  • Posts: 17536
  • Rep: 3
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #498 on: May 11, 2010, 03:34:01 PM »
yep.

Offline nicsan2009

  • Ultra Heavyweight
  • Posts: 1836
  • Rep: 5
  • Here we go again!
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI-ing (.py files, coding, R+D, and help)
« Reply #499 on: May 11, 2010, 03:49:36 PM »
its not the bindings if it crashes at start up
Hosted 2 Legit 2 Quit tourney Congrats Somebody
Hosted 2 Legit 2 Quit 2 congrats to Plazmic Inferno as well as Somebody (again)
Hosted RA2 World Cup Congrats to Senstro
Hosted TGRR congrats to 090901
ITAT Tournament- Champion
Beetle Bashers- Champion
Father and Son Tournament 2- Champion
GTM All Stars- HW Champion; MW runner up
Father and Son Tournament- Runner up
All Time Record 51-36