Your AI vs Spring Tanks?

Your AI vs Spring Tanks?

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Your AI vs Spring Tanks?

Post by knorke »

Inspired by the "Mod X vs AI" thread where it was said that game makers not helping AI devs coupled with a non-presence in the AI community is actually to blame why we can't have nice things.

I am presenting my presence!
This could be your AI:
Image
Do bitches not yet know about mah tanks?

Basically I was thinking it works like this:
I tell you stuff you need to know about the game so you can make your AI work.

How it will not work:
You tell me stuff about your AI so I can make it work.

I will:
-include any LuaAI somebody might make into Spring Tanks
-might change the Lua stuff somewhat, so it is easier for your AI to play. Not sure what that would be, ie adding some SendToAi (some info) lines in a gadget or something, you tell me? (But will not clutter everything with a million files and changes.)
-try to answer any questions.

Keep in mind:
-Game will change.
-Will not debug, config or compile your stuff unless it is SUPER easy
-I only have windows so AI should run on that
-Might make/decide on some standard maps with fixed start positions (so AIs can include waypoint files or w/e)
-No "bawwbaw I made you AI and wasted so much time"-drama
-like for real, no drama.
-it is ok if the AI cheats (mine uses global los too)
-unzip the .sdz to look at stuff, there is no svn (do not want)

Still interessted?

--lol info--
Internal unit names:
tpbase - the ice cone shaped base
tpflag - the flag (orly)
tplegocar - the small "Blitz" car
tptaktak - the light "TakTak" tank
tpthulsa - the big "Thulsa" tank

Flags are carried by being transported.
So you can check if a unit carries a flag by checking if it transportes a "tpflag" unit. If the unit lost the flag but, that is because it scored and the flag was returned to base.
Beside dying, that is the only way to lose a flag.

blublub looking forward to your application please attach no erotic pictures.
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Your AI vs Spring Tanks?

Post by SpliFF »

I'm happy to help. I've been working on a widget AI for a while now which I'm about to port to LuaAI. It's modular so I can adapt it to a variety of games.

Of course, having seen how random and totally retarded your units are from that movie you posted I think all I really need to do is write a script that makes the AI units WAAAAAAAAAAAAAGH!!!!!! and then fucking explode!

Sound good?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Your AI vs Spring Tanks?

Post by knorke »

sounds good.
these units are slightly less retarted though as this video shows:
http://www.youtube.com/watch?v=xlgV64CEE7Q
All scenes is me playing vs AI or AI vs AI btw, it started with a widget AI too.
(AIAIAIAIAI)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Your AI vs Spring Tanks?

Post by AF »

I would be interested, beyond the classic TA mechanics, what features would an AI need to support?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Your AI vs Spring Tanks?

Post by knorke »

http://springrts.com/wiki/Spring_Tanks wrote:Each player starts with a squad of tanks, a base and two flags. Pick up enemy flags by touching them with a unit and carry them to your base to score. The player with the highest score after a set timelimit wins.
So there basically are no classic TA mechanics beside of course there is combat.
Really best to watch the video, read wiki page and try the game out. (for lazy people there is also a "watch 2 lame AIs play" (Tank TV) mode in the singleplayer menu. SP only works in windows.)
What features the AI has is up to the creator. ie my AI is very simple:
if unit carries no flag: drive towards enemy flag
if unit carries a flag: drive towards home base
The picking up flags part is done automagically by a gadget, so AI/players can just drive their units over the flag. (like in FPS game)


What the AI needs to know:
-the unit named "tpflag" is a flag. I can not be destroyed.
-driving near an enemy flag, will pick it up (transport it)
-AI can see what unit transports a flag by checking its passenger.
ie for a LuaAI Spring.GetUnitIsTransporting
-At the moment, "tpflag" is the only transportable unit. Later they might be powerups that also attach to the units. (like a health recharger or turret) But for now, if a unit is transporting something you can be sure it is carrying a flag.
-The Blitz car is unarmed, its weapon is fake so you can FPS controll it. <- can remove if it confuses AI


More advanced features/tactics could be:
-Units carrying a flag should avoid the enemy: ie going less direct paths.
-protect your flag carrier
-Attack in some formation/group instead of random single units arriving at the enemy
-only fight in superior numbers
-you can "free up" units for offense if you let the enemy steal your flag and then cut him off in the middle of the map.
-adjust tactic based on score (ie more defensive if you are winning)
...
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Your AI vs Spring Tanks?

Post by SpliFF »

Can you fix up your weapon target tags. It looks like the AI target the flag and base.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Your AI vs Spring Tanks?

Post by knorke »

tags are already set so units can not fire at flag/base.
I tried messing with tags some more but there seems to be no way, that if you have a unit selected and put the mouse over an enemy flag that the cursor will not turn into a attack icon.
Just tried Spring.SetUnitNeutral on flag&base but does not seem to fix it.

So basically flag/base can and will not be attacked but the units try to if directly told so. But the important part is the if directly told so. They will not behave stupid and drive around to attack something they can not attack.
Even if you send them past an enemy base with a fight command, they will not stop at the enemy base to "shot" it. I think it is not possible to make the flag/base anymore neutral than this...

Why my AI sometimes "gets stuck" on the enemy base is because it just uses
enemy = Spring.GetNearestEnemy()
Spring.GiveOrderToUnit (attack enemy)

without filtering if enemy is a "real" attackable unit.
Ideally an AI would use a more clever way to chose what to attack ;)

Similiar problem is btw if a human player rightclicks a unit onto its base in hope that the unit will go there. The unit will drive to the base, but because it was actually given a guard command, will stop some centimeters further away then expected. Because thats how the guard command works appearently...

If it is a bigger problem it might be possible for a widget/gadget to change such orders into move commands via AllowCommand()
Post Reply

Return to “AI”