gametechmods

Robot Arena => General Support => Topic started by: Natster-104 on November 23, 2014, 01:54:37 PM

Title: How would I ai a Thwackbot :/
Post by: Natster-104 on November 23, 2014, 01:54:37 PM
generally confused

par exemple:

(https://gametechmods.com/uploads/images/99257Help.png)

Title: Re: How would I ai a Thwackbot :/
Post by: yugitom 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.
Title: Re: How would I ai a Thwackbot :/
Post by: Natster-104 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
Title: Re: How would I ai a Thwackbot :/
Post by: RedAce 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. (https://gametechmods.com/forums/index.php?topic=1103.msg643372#msg643372)
Title: Re: How would I ai a Thwackbot :/
Post by: Somebody 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.
Title: Re: How would I ai a Thwackbot :/
Post by: Natster-104 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
Title: Re: How would I ai a Thwackbot :/
Post by: yugitom 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.
Title: Re: How would I ai a Thwackbot :/
Post by: playzooki on November 23, 2014, 04:17:04 PM
Maybe you could ai it as a low-range spinner with a button that reverses?
Title: Re: How would I ai a Thwackbot :/
Post by: Somebody 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.
Title: Re: How would I ai a Thwackbot :/
Post by: Somebody 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.
Title: Re: How would I ai a Thwackbot :/
Post by: playzooki 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.
Title: Re: How would I ai a Thwackbot :/
Post by: yugitom 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.
Title: Re: How would I ai a Thwackbot :/
Post by: Resetti's Replicas 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.
Title: Re: How would I ai a Thwackbot :/
Post by: Naryar 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.