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

Offline Wolfsbane

  • Heavyweight
  • Posts: 583
  • Rep: -5
  • Pokemens.
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
  • Skype: suicideladder
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1100 on: May 13, 2014, 07:54:35 PM »
I have a question about MeltyBrain. Is it a tactic or AI?
Man this needed an update. Anyways, Your local autistic idiot signing out.


Offline Philippa

  • The Queen of GTM
  • Giga Heavyweight
  • Posts: 6186
  • Rep: 0
  • ✊ Viva la Standard! ✊
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1102 on: May 14, 2014, 01:50:35 PM »
How do I AI this?
(Image removed from quote.)
electrichammer.py? Just copy/edit bisectors AI from DSL BBEANS AI.

I have a similar robot that needs AI'd. Can I get the Bindings line for this please? And also what to name the smartzones/controls?

Offline cephalopod

Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1103 on: May 14, 2014, 02:12:24 PM »
Surely you could use Frenzy.py?
That uses an analog control named 'Hammer' and the smartzone 'whipzone'. It's basically whipper but with a spin motor, from what I can tell.
bristol bot builders / two headed death flamingo / snappy robots
//
kindest and friendliest '13, '15, '16, '17 / favourite staff member '14, '15

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 #1104 on: May 22, 2014, 08:44:00 PM »
Just curious, but has anyone tried a "take-opponent-to-hazards" py file?

for example
robot in smart zone -> actively aim for hazards instead of avoid them

Might make some wedge matches more interesting.

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 #1105 on: May 23, 2014, 02:50:56 PM »
you could reduce radius but then again it won't aim actively into hazards.

 i don't think there's any non-arena-specific way to do that though. maybe I am wrong.

also would be very interesting for pushers and most rammers.

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, nose-orienting R+D, and help)
« Reply #1106 on: May 23, 2014, 08:34:00 PM »
Just curious, but has anyone tried a "take-opponent-to-hazards" py file?

for example
robot in smart zone -> actively aim for hazards instead of avoid them

Might make some wedge matches more interesting.

The 'Shove' tactic that came with the game does this.  It gets appended to most bots after they lose their weapons.  The arena needs to have hazards defined by collision lines and possibly a map file as well for it to work, though.  (I'm not really sure if the arena map files actually do anything.)

IIRC, Shove doesn't work on its own though.  You need Engage and Shove or Charge and Shove.

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 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 #1107 on: June 12, 2014, 02:08:21 PM »
I would like to know what I would have to add the .py file so when a bot I stuck on it's front it would fire it's weapons/srimech
Reference pic:

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, nose-orienting R+D, and help)
« Reply #1108 on: June 13, 2014, 10:08:02 PM »
Try this:

Code: [Select]
        if list(plus.getDirection(self.GetID(),0))[1] < -0.9:
            self.Input("Srimech", 0, 1)

Haven't tested it so you may need to fiddle with the exact number.  But that's the code you would use.

Decreasing the number (to a bigger negative number) will make it less sensitive.  It can go up to -1 (the bot is perfectly balanced on its front).  Increasing the number (closer to 0) will make it more sensitive.  For reference, 0 is when the bot is flat on its wheels.

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 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 #1109 on: June 14, 2014, 10:08:06 AM »
Seems to work, thanks Click.

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 #1110 on: June 20, 2014, 02:26:07 PM »
I'm having some difficulty AI-ing Tommy's bot.





Bot in thread:
https://gametechmods.com/forums/index.php?topic=16331.msg643329#new


Bindings:
Code: [Select]
    list.append(("Smite Jr","ElectricHammer",{'nose':math.pi,'invertible':True,'radius':1,'topspeed':100,'throttle':100,'turn':100,'turnspeed':2.5,'NoChassisTime':2,'StartAngle':math.pi,'SwingTime':5,'weapons':(0,)}))

According to Tommy, he would like me to AI this bot to behave like Stinger. The problem is I have no idea how to do this, so I used ElectricHammer.py to have it swing back and forth. I also am having the problem where if I pause the game with this bot in the arena, the game crashes in a second.


Am I AI-ing it wrong? Is there something missing in the Bindings? Do I need to modify the analog functions in the wiring? am I excluding something in this explanation?


Thank you.

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 #1111 on: June 20, 2014, 04:58:46 PM »
Well I got it (sorta) working:
https://gametechmods.com/uploads/files/9742Smite Jr.zip

Comes with Smite Jr with controls + smartzone, THZ.py, and binding line.
Turnspeed and turn still needs to be tweaked however.

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 #1112 on: June 20, 2014, 05:22:03 PM »
I've done some tweaking on the turnspeed and turn, Also for some reason, one wheel clips through the floor on the small arena and I have no idea why.


It does work. Thank you 090901!

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 #1113 on: June 20, 2014, 05:27:51 PM »
Also for some reason, one wheel clips through the floor on the small arena and I have no idea why.
Probably due to the small arena having very low start points, I'll see if I can raise them.
*Edit* Start points are now 2x higher, should be helpful for large Stock LW vs too: https://gametechmods.com/uploads/files/9751smallarenagmfraisedstartpoints.zip

Offline freeziez

  • Ultra Heavyweight
  • Posts: 4720
  • Rep: 2
  • He's Mr. White Christmas, he's Mr. Snow...
    • youtube.com/freeziezGTM
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1114 on: June 25, 2014, 05:00:09 PM »
hey guys so i'm finishing bb5 finally because i'm that bad on timing and i'm having trouble AIing the 8 bots I need. All relevant info should be here. I'll send more if it's needed.

https://gametechmods.com/uploads/files/6157AI.zip

bots are included so you can take a look at them
obligatory battlebots 5 comment

GTM Awards 2011

Best Tournament: B4ttlebots (freeziez)
Best New Tournament Host: freeziez
Most Suprising Tournament: B4ttlebots (freeziez)

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 #1115 on: June 27, 2014, 11:43:15 AM »
Hopefully this does the trick:

https://gametechmods.com/uploads/files/7803Battlebots 5.zip

Basically the new Bindings for the bots, since I didn't have the DirectionalSpinner.py, the AI codes have been changed.


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 #1117 on: November 22, 2014, 06:31:37 PM »
I'm pretty sure this question has been asked before, but does anyone have an sample AI line for TRFBD.py?

Offline yugitom

  • *
  • Posts: 2378
  • Rep: 17
  • Google Garry's Wars
    • TheYuGiTom
    • View Profile
    • Awards
  • Skype: nanwiththeplan
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1118 on: December 15, 2014, 10:32:55 AM »
I have been trying to AI bots with the Popup.py and it's fine until it gets to the 1 count in-game and then my game just crashes. Does anyone know the cause of this?

Offline martymidget

  • *
  • Posts: 3459
  • Rep: 7
  • Mr Flibble is very cross.
    • http://tts.imtranslator.n
    • View Profile
    • :)
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1119 on: February 10, 2015, 01:35:05 PM »
Got a robut that is wired up correctly, but the weapons won't spin. Everything else is all good.