Author Topic: How would I ai a Thwackbot :/  (Read 1980 times)

Offline Natster-104

  • Ultra Heavyweight
  • Posts: 1406
  • Rep: 6
    • http://www.youtube.com/ch
    • View Profile
    • Awards
  • Skype: natster-104
How would I ai a Thwackbot :/
« on: November 23, 2014, 01:54:37 PM »
generally confused

par exemple:




Offline yugitom

  • *
  • Posts: 2378
  • Rep: 17
  • Google Garry's Wars
    • TheYuGiTom
    • View Profile
    • Awards
  • Skype: nanwiththeplan
Re: How would I ai a Thwackbot :/
« Reply #1 on: November 23, 2014, 03:27:19 PM »
Do you mean a Stinger-type bot? That's what I see in the picture but I thought a 'Thwack' bot was a bot that had a flail and spun horizontally. If you did mean Stinger-type bot, you can try THZ.py, Electrichammer.py or Frenzy.py. There's no way for a bot like that to be AI'ed properly, as far as I know, because all the options seem to make them 'regret' attacking and just flip the other way, so they don't really hit much during AI matches.

Offline Natster-104

  • Ultra Heavyweight
  • Posts: 1406
  • Rep: 6
    • http://www.youtube.com/ch
    • View Profile
    • Awards
  • Skype: natster-104
Re: How would I ai a Thwackbot :/
« Reply #2 on: November 23, 2014, 03:40:34 PM »
Do you mean a Stinger-type bot? That's what I see in the picture but I thought a 'Thwack' bot was a bot that had a flail and spun horizontally. If you did mean Stinger-type bot, you can try THZ.py, Electrichammer.py or Frenzy.py. There's no way for a bot like that to be AI'ed properly, as far as I know, because all the options seem to make them 'regret' attacking and just flip the other way, so they don't really hit much during AI matches.
Yes I did mean stinger type bot, and thanks for the help, I was generally stumped

Offline RedAce

  • Host of The Award Winning Deathmatch Series
  • *
  • Posts: 3964
  • 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: How would I ai a Thwackbot :/
« Reply #3 on: November 23, 2014, 03:48:52 PM »
Actually, I had this issue when AI'ing Tommy's bot for Beetle Bashers. 090901 helped me out with this issue. You can find the bot and the (sorta) working AI here.

Offline Somebody

  • *
  • Posts: 7201
  • Rep: 13
  • CP: +2
    • View Profile
    • Awards
Re: How would I ai a Thwackbot :/
« Reply #4 on: November 23, 2014, 03:57:51 PM »
Haven't AIed anything in a while, but I don't see why you couldn't give it a circular or half-circle smartzone mounted vertically (essentially parallel with the wheels), and then set a button to jam both wheels into reverse whenever a bot is in the smartzone. It seems like it'd be rudimentary and there's probably better specific AIs out there, but it's simple.
I built that big robot on that TV show that time


Offline Natster-104

  • Ultra Heavyweight
  • Posts: 1406
  • Rep: 6
    • http://www.youtube.com/ch
    • View Profile
    • Awards
  • Skype: natster-104
Re: How would I ai a Thwackbot :/
« Reply #5 on: November 23, 2014, 04:05:07 PM »
Just been looking over red's ai post, so I think I can get it sorted, in fact since I've posted codeacademy.com, more people can get involved in Python and make custom .py files, (like lemon) and so we could have custom bots

Offline yugitom

  • *
  • Posts: 2378
  • Rep: 17
  • Google Garry's Wars
    • TheYuGiTom
    • View Profile
    • Awards
  • Skype: nanwiththeplan
Re: How would I ai a Thwackbot :/
« Reply #6 on: November 23, 2014, 04:11:28 PM »
Haven't AIed anything in a while, but I don't see why you couldn't give it a circular or half-circle smartzone mounted vertically (essentially parallel with the wheels), and then set a button to jam both wheels into reverse whenever a bot is in the smartzone. It seems like it'd be rudimentary and there's probably better specific AIs out there, but it's simple.
That is what 09 and myself did but it still does the thing where it 'regrets' attacking and just pulls back. I asked 09 myself whether there was a good way to get around this issue and he didn't know of one, that's why he said he 'sorta' got it working.

Offline playzooki

  • A title is a prefix or suffix added to someone's name in certain contexts. It may signify either veneration, an official position or a professional or academic qualification. In some languages, titles may be inserted before a last name (for example,
  • Posts: 2122
  • Rep: -34
    • View Profile
    • click to download more ram
    • Awards
  • Skype: dont stalk me
Re: How would I ai a Thwackbot :/
« Reply #7 on: November 23, 2014, 04:17:04 PM »
Maybe you could ai it as a low-range spinner with a button that reverses?

Offline Somebody

  • *
  • Posts: 7201
  • Rep: 13
  • CP: +2
    • View Profile
    • Awards
Re: How would I ai a Thwackbot :/
« Reply #8 on: November 23, 2014, 04:33:34 PM »
Haven't AIed anything in a while, but I don't see why you couldn't give it a circular or half-circle smartzone mounted vertically (essentially parallel with the wheels), and then set a button to jam both wheels into reverse whenever a bot is in the smartzone. It seems like it'd be rudimentary and there's probably better specific AIs out there, but it's simple.
That is what 09 and myself did but it still does the thing where it 'regrets' attacking and just pulls back. I asked 09 myself whether there was a good way to get around this issue and he didn't know of one, that's why he said he 'sorta' got it working.

From watching a video of it, it definitely looks like the opponent is falling out of the smartzone. Since that one was bouncily running on saws, a wider smartzone would be a good start, but also maybe a farther out smartzone to keep it committed to backing up. Other options would be to put the backing up on a time delay if possible (Basically committing it to go through with the entire attack before proceeding with anything else).

Either way, at least in the case of the beetleweight, I'm not sure it really even has the power to do a ton of damage. But most beetleweights don't.
I built that big robot on that TV show that time


Offline Somebody

  • *
  • Posts: 7201
  • Rep: 13
  • CP: +2
    • View Profile
    • Awards
Re: How would I ai a Thwackbot :/
« Reply #9 on: November 23, 2014, 04:40:04 PM »
Maybe you could ai it as a low-range spinner with a button that reverses?

As in like running forward consistently until being switched to backwards? It would kind of depend on the execution essentially, especially if it's able to turn or not.
I built that big robot on that TV show that time


Offline playzooki

  • A title is a prefix or suffix added to someone's name in certain contexts. It may signify either veneration, an official position or a professional or academic qualification. In some languages, titles may be inserted before a last name (for example,
  • Posts: 2122
  • Rep: -34
    • View Profile
    • click to download more ram
    • Awards
  • Skype: dont stalk me
Re: How would I ai a Thwackbot :/
« Reply #10 on: November 24, 2014, 02:12:57 AM »
Maybe you could ai it as a low-range spinner with a button that reverses?

As in like running forward consistently until being switched to backwards? It would kind of depend on the execution essentially, especially if it's able to turn or not.
It would move normally, but go backwards when the opponent is in range. Not sure if it will work, will have to try myself.

Offline yugitom

  • *
  • Posts: 2378
  • Rep: 17
  • Google Garry's Wars
    • TheYuGiTom
    • View Profile
    • Awards
  • Skype: nanwiththeplan
Re: How would I ai a Thwackbot :/
« Reply #11 on: November 24, 2014, 02:20:29 AM »
Wouldn't it need to stop moving normally first? I think that the action taken when in the smartzone will be cancelled out by the bot driving forward, causing the same problem. Maybe an AI could be made that stops a robot from moving whilst an opponent is in its smartzone, making backwards the only direction it will go.

Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: How would I ai a Thwackbot :/
« Reply #12 on: November 25, 2014, 12:16:39 AM »
Why don't you just wire it up to a spin motor and give it THZ.py?  It's not technically a torque reaction bit, but it'll look the same, and I won't tell if you won't.

Offline Naryar

  • Posts: 23267
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: How would I ai a Thwackbot :/
« Reply #13 on: November 25, 2014, 08:06:15 AM »
I'm thinking a simple whipper.py with one of these huge, vertical, cylindrical smartzones and whip=BackAndForth. Actually it should work like Stock's Little Metal Friend, only vertical and with some different controls.

You will need to modify whipper.py so it actually uses Forward instead of LeftRight for the whipping, and most likely a piece of code that inverts the whipping when the bot is inverted.