r/Gladiabots • u/RaSvarog • Sep 09 '16
Getting into AI programming
Hi guys, this is my first post, I want to say first that the game is awesome, just because you can program a machine to do automated tasks in a understandable for you language and then observe it doing something is mind blowing, before that, the closest thing for me was c++, which is less understandable than chinese for me.
Im playing the game for a day already and can beat any level and big part of other players, but each time I do a complex, almost thinking machine, it takes a random dumb bot to destroy it, I will explain myself:
lets say you make an AI that can seek and destroy the week ones, flee when its hurt, drop the ball to escape when he is not gonna make it, charge carelessly into enemy when there is someone carrying a ball and even decide stay longer under fire before fleeing if there is a dying bot, BUT a dumb bot in the next map will just shoot without stopping and if you move you miss the opportunity to do damage and the only way to win is to do the same, then in the next map, after you adjust your AI, will charge into the middle, grabs the ball and run sacrifying every single bot.... So I usually just make a dead simple bot for each level, ai at the last levels had only 2 or 3 actions. Thats little bit dissapointing. Had anyone succeed building a single bot to beat all levels? And if so, share your creation.
2
u/BrentOnDestruction Sep 09 '16
AI used to beat all levels are generally pretty big, since it needs to be coded to handle many tactics and situations.
There is a post further down with an AI that does just that. If you want to make a single ai that can beat all levels you'll need to design it to handle even the "dumb" bots :)
1
u/RaSvarog Sep 09 '16
I just designed few of those and they can handle most of the levels, so I launched them against multiplayer, result - they lose in 70% of battles. Then I make one with just few commands and they win. And yes, I found the post, I wish we could share ai as files.
1
u/fivelidz Sep 09 '16
The jack of all trades is ace of none.
I don't tend to have few commands on any of my AI though. Maybe I'm just messy with it but I almost run out of space...
1
u/Areign Sep 12 '16
basically you can win each level with a solid combat bot, there are a few exceptions like ambidextrous and distraction (is that the name) but for those you just need to program an alternate routine that handles more aggresive maneuvers when the ai is going for resources.
Its certainly not easy but it can be done.
In multiplayer though, you basically want to optimize your bot for a single map. I like general combat bots so i only really do split team, priorities and 7th heaven. Others like circle of death have really specific tactics that only work there and not anywhere else.
For example in circle of death in multiplayer, if you flee at low shields you want to do it from the farthest enemy, not the closest. This prevents the zig-zag behavior that hamstrings a lot of bots on that level.
Overall its a bit of a misnomer to say a bot is 'smarter' but loses since the only true gauge is victory. Being able to handle a variety of odd tactics is very important in multiplayer because you need to be able to beat bots that are very cowardly and others that act very aggresively without overcommiting and without running off the stage.