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

Offline 090901

  • alcoholic in denial
  • *
  • Posts: 7005
  • 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 #1300 on: February 04, 2019, 07:13:03 PM »
what redalert said is 100% wrong, if you're going to ai something with a geared beta you'll want to use electrichammer.py or thz.py and wire the flamethrower to the same analog control that controls the forward hammer swing.

Offline CrustyRaisins

  • Antweight
  • Posts: 14
  • Rep: 0
  • Probably trash.
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1301 on: February 05, 2019, 08:51:40 AM »
Ok, thanks 090901. Do you know where I can find those scripts?
Made you look!

Offline Badger

  • Permanent Artifact
  • Giga Heavyweight
  • Posts: 6318
  • Rep: 3
  • I wish to be with my people
  • Awards BOTM Winner Donated money for site hosting 2019
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1302 on: February 05, 2019, 10:05:47 AM »
Ok, thanks 090901. Do you know where I can find those scripts?
https://github.com/apanx/RA2_AI - This link contains all the latest versions of all the AI files the community has made for RA2

Click the green "Clone or Download" button, then click "download ZIP". Extract all the files inside the .zip into the AI folder of your RA2 install.
also lol at most toxic guy around calling others out on this sh**
Google Drive with my newer bots

Offline Billy5545

  • Best Newcomer 2018
  • Posts: 796
  • Rep: 4
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
  • Discord: Kendor#3191
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1303 on: February 05, 2019, 04:16:56 PM »
what redalert said is 100% wrong, if you're going to ai something with a geared beta you'll want to use electrichammer.py or thz.py and wire the flamethrower to the same analog control that controls the forward hammer swing.
Just curious, but what about the Judge py? Because IIRC, I have been AI'ing my hammerbots that uses geared beta with the Judge py, according to the beta rep on DSL

Offline 090901

  • alcoholic in denial
  • *
  • Posts: 7005
  • 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 #1304 on: February 05, 2019, 04:31:48 PM »
forgot about that one, yeah it works too

Offline CrustyRaisins

  • Antweight
  • Posts: 14
  • Rep: 0
  • Probably trash.
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1305 on: February 06, 2019, 08:17:21 PM »
Which script would I use for a bot with a saw on a retractable arm? (like S.O.B. or SawBlaze)
Made you look!

Offline IceCreamRulez

  • Antweight
  • Posts: 98
  • Rep: 0
  • That guy who isn't very good at modding
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1306 on: February 22, 2019, 08:30:55 AM »
I need some help. I've been trying get Gravity's flipper to work in RWRA2 for months on end and still nothing is working. I've tried using different smart zones, renaming the controls, changing the bindings but Gravity just won't flip. The bot itself is controlling just fine, it's just the flipper won't work despite me putting a smart zone in.

Offline 09090901

  • competitive irl
  • *
  • Posts: 1742
  • Rep: 22
  • anti-boomer super soldier
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1307 on: February 22, 2019, 05:10:49 PM »
did you name the smartzone accordingly?
DSL-IRL is the libtard’s meta. Go drink more soylent, retard! #BLUELIVESMATTER

Offline IceCreamRulez

  • Antweight
  • Posts: 98
  • Rep: 0
  • That guy who isn't very good at modding
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1308 on: February 22, 2019, 07:16:37 PM »
Yes. I named the smartzone as flip and the control as flip (also tried changing them both to fire but to no avail) as well. Every other robot that I've AI'd with a flipper has worked fine, it's just Gravity that doesn't seem to want to cooperate.

Offline TheRoboteer

  • Mr Big Blue Flipper
  • *
  • Posts: 1587
  • Rep: 9
  • "I HATE SEBASTIAN COE!"
  • Awards Donated money for site hosting 2021
    • View Profile
    • Awards
  • Discord: TheRoboteer#8784
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1309 on: February 22, 2019, 07:20:53 PM »
Yes. I named the smartzone as flip and the control as flip (also tried changing them both to fire but to no avail) as well. Every other robot that I've AI'd with a flipper has worked fine, it's just Gravity that doesn't seem to want to cooperate.
The control should be Flip with a capital F
Notable Tournament Performances:
The Beginner's Guide to IRL:
https://gametechmods.com/forums/tutorials-and-tips/irl-a-beginner's-guide

Offline Badger

  • Permanent Artifact
  • Giga Heavyweight
  • Posts: 6318
  • Rep: 3
  • I wish to be with my people
  • Awards BOTM Winner Donated money for site hosting 2019
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1310 on: February 23, 2019, 04:05:00 AM »
Yes. I named the smartzone as flip and the control as flip (also tried changing them both to fire but to no avail) as well. Every other robot that I've AI'd with a flipper has worked fine, it's just Gravity that doesn't seem to want to cooperate.
The control should be Flip with a capital F
Just as a note, this is for Flipper2.py. Omni.py should have the smartzone be named "weapon" and the control called "Fire". Smartzones are all lowercase, controls have their first letter capitalised.
also lol at most toxic guy around calling others out on this sh**
Google Drive with my newer bots

Offline Yoloskater224

  • Mr Stealyogirl
  • Antweight
  • Posts: 53
  • Rep: -1
  • I'm just sayin, granny's revenge is HOT
    • Insert_Name_Here224
    • View Profile
    • Awards
  • Discord: Stolen_Kryptic#0782
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1311 on: February 23, 2019, 05:19:31 PM »
On The topic of making an AI With a flaming hammer, i don't really understand? What do you call the controlls, and what do you mean "put the flame and the hammer on the same one"  :dead:
pepsi max

Offline Billy5545

  • Best Newcomer 2018
  • Posts: 796
  • Rep: 4
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
  • Discord: Kendor#3191
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1312 on: February 23, 2019, 05:49:43 PM »
On The topic of making an AI With a flaming hammer, i don't really understand? What do you call the controlls, and what do you mean "put the flame and the hammer on the same one"  :dead:
It's named Fire for both the hammer and flamethrower. And the flamethrower and hammer are wired to a single control since it's both easier to AI and the flamethrower is supposed to activate when the hammer fires

Offline Yoloskater224

  • Mr Stealyogirl
  • Antweight
  • Posts: 53
  • Rep: -1
  • I'm just sayin, granny's revenge is HOT
    • Insert_Name_Here224
    • View Profile
    • Awards
  • Discord: Stolen_Kryptic#0782
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1313 on: February 23, 2019, 05:50:57 PM »
Cool thanks!  :beer:
pepsi max

Offline Yoloskater224

  • Mr Stealyogirl
  • Antweight
  • Posts: 53
  • Rep: -1
  • I'm just sayin, granny's revenge is HOT
    • Insert_Name_Here224
    • View Profile
    • Awards
  • Discord: Stolen_Kryptic#0782
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1314 on: February 23, 2019, 06:26:33 PM »
Hate to double post, and i don't mean to keep asking questions but where do you find the MotorID for different motors? i've checked different files and throught the component .txt file things but i cant seem to find it anywhere...  :confused:
pepsi max

Offline Billy5545

  • Best Newcomer 2018
  • Posts: 796
  • Rep: 4
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
  • Discord: Kendor#3191
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1315 on: February 23, 2019, 07:58:57 PM »
Hate to double post, and i don't mean to keep asking questions but where do you find the MotorID for different motors? i've checked different files and throught the component .txt file things but i cant seem to find it anywhere...  :confused:
You have to count the components manually in the bot file,as the ID is based on the order you put the components. The MotorID is the same as component ID. First component placed has the ID of 1, with chassis being 0.

Alternatively, you can use Apanx's Bot Exporter, which is far easier to find ID's

Offline IceCreamRulez

  • Antweight
  • Posts: 98
  • Rep: 0
  • That guy who isn't very good at modding
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1316 on: March 04, 2019, 04:56:25 PM »
Got Gravity's flipper working. The problem? The control was named "fire" instead of "flip"  :facepalm:

Offline KidDelta

  • Treasure Sniper
  • Heavyweight
  • Posts: 557
  • Rep: 3
  • "To Comfort the Disturbed, and Disturb the Comfort
    • View Profile
    • Awards
  • Discord: X Æ A-12#8572
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1317 on: March 05, 2019, 06:46:33 AM »
Got Gravity's flipper working. The problem? The control was named "fire" instead of "flip"  :facepalm:
OOF
I shouldn't have come here

Offline Redalert

  • The inventor of Wandering Spinners and invincirammers
  • Ultra Heavyweight
  • Posts: 1349
  • Rep: -48
  • Yes, I’m an outsider.
    • View Profile
    • RedStorm's RA2 website
    • Awards
  • Discord: RedStorm
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1318 on: April 29, 2019, 02:04:26 PM »
Sorry to bump-
What's the difference between a flipper and an omni binding, in how it performs? I know the weapon controls and smartzones are labeled different, but is there really anything special about the flipper binding, or can I just use the omni to Ai a flipper bot?


Offline UberPyro

  • Lightweight
  • Posts: 205
  • Rep: 6
  • Well, here goes.
  • Awards GTMCS Division Winner
    • View Profile
    • Awards
Re: AI-ing (.py files, coding, nose-orienting R+D, and help)
« Reply #1319 on: April 29, 2019, 04:01:57 PM »
from the very top of clickbeetle's flipper2.py

Quote
# Flipper2.py last updated 7/24/12 by Clickbeetle
# Update 7/24/12: Renamed this file to Flipper2.py so Flipper.py is not overwritten.  Added customizable srimech firing interval.

# This AI will act normally as long as the opponent is moving.  If the opponent stops moving, this AI will also stop and wait for the opponent to be counted out.  If the opponent starts moving again, so will this AI.  In a rumble, this AI will ignore any bots that aren't moving and will only stop if all opponents stop.
# Has support for two smart zone-based weapons and one analog-controlled spinner.  Name the smart zones "flip" and "weapon" and the controls "Flip", "Fire", and "Spin".  "Srimech" control for self-righting.  Note you must put 'UseSrimech':1 in Bindings.py to self-right with the Srimech control; otherwise it will use Flip.
# CUSTOMIZABLE SETTINGS:
# 'EnemyMoveRadius' sets how far the enemy must move in order to be considered mobile.  Default is 1.
# 'EnemyMoveTime' sets how long (in seconds) the enemy has to move the required distance before being considered immobile.  Default is 3.
# 'PrioritizeFlipper' if set to 1, the AI won't fire the other weapon until the flipper fires.  Useful for bots that use the flipper to get under opponents.  When all of self.weapons are lost, the flipper will stop firing and the other weapon will fire even when the flipper doesn't.  The flipper component id's should therefore be set in self.weapons and no other id's for this to work.  Default is 0.
# 'NoChassisTime' sets how long (in half-seconds) the AI will wait to find the chassis before giving up and firing, when there are components in the smart zone.  ONLY WORKS FOR SECONDARY WEAPON, NOT FLIPPER so wire the bot and name the controls like you are using Omni or Popup.py if you use this.  Default is 1.
# 'SrimechInterval' sets how often the AI fires the srimech when attempting to self-right.  Srimech will fire once every X seconds.  Default is 1.
it tries to be smart by not flipping things that are immobilized
the stock flipper.py is mostly the same thing except without the extra controls to fire, spin, and srimech. I'm not sure how well it works though and at the end of the day I don't think the ai is that important.