It's about time! Fortress AI
It's about time! Fortress AI
https://code.launchpad.net/~armagetrona ... ortress_ai
The approach is simple: The AIs are already quite generically programmed, so I just swapped their cycle target pointer with a more generic game object pointer and made the virtual functions queried by the AI return more sensible values (like, speed = 0). The team intelligence is built into the fortress zones; they instruct own team members to come defend and enemies to attack. Of course, the AIs mostly think they can kill the zones by trapping the center, which isn't quite right, and have no idea yet about the zone shape and that a defender is supposed to stay inside and stuff, but it's a start. Sumo works well for the first 5 seconds or so already, then the AIs decide to bugger off again and get eliminated.
Planned:
- make the defender see zone boundaries like 'soft' walls that it'll try to avoid.
- still better team management
- maybe, just maybe, have the buggers grind.
I don't think this will get as far as teaching a defender to chase its own tail or teaching the attackers to inject themselves into the defender's circle (although in theory some of the basic routines they already know could help them there.). The goal is just to make them at least try to play a decent game and to allow new players to learn the basic game rules by playing with them.
And yeah, I'm keeping CTF in mind. The same basic routines can be used there, you just replace 'defend/attack fortress' with 'defend/grab/recover/bring home flag'.
Finest moments so far on Fortress:
- one of the enemy AIs managed a center attack (well, not really difficult without the opponents grinding), caught me by surprise and pushed me out where I died.
- two attackers ganked me.
The approach is simple: The AIs are already quite generically programmed, so I just swapped their cycle target pointer with a more generic game object pointer and made the virtual functions queried by the AI return more sensible values (like, speed = 0). The team intelligence is built into the fortress zones; they instruct own team members to come defend and enemies to attack. Of course, the AIs mostly think they can kill the zones by trapping the center, which isn't quite right, and have no idea yet about the zone shape and that a defender is supposed to stay inside and stuff, but it's a start. Sumo works well for the first 5 seconds or so already, then the AIs decide to bugger off again and get eliminated.
Planned:
- make the defender see zone boundaries like 'soft' walls that it'll try to avoid.
- still better team management
- maybe, just maybe, have the buggers grind.
I don't think this will get as far as teaching a defender to chase its own tail or teaching the attackers to inject themselves into the defender's circle (although in theory some of the basic routines they already know could help them there.). The goal is just to make them at least try to play a decent game and to allow new players to learn the basic game rules by playing with them.
And yeah, I'm keeping CTF in mind. The same basic routines can be used there, you just replace 'defend/attack fortress' with 'defend/grab/recover/bring home flag'.
Finest moments so far on Fortress:
- one of the enemy AIs managed a center attack (well, not really difficult without the opponents grinding), caught me by surprise and pushed me out where I died.
- two attackers ganked me.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
Awesome!
Also explains that...
Code: Select all
22:31:04 < z-man> THEY FRIGGING GANKED ME
If you don't mind that defenders get in each others way and teamkill, then sure, you can put four AIs on defense duty. That is going to be configurable. About holing, I don't think I'll be able to teach them how to do it well and in the right situations, so I probably won't.
And the chatbot is already better. It's just up to the server admin to unlock it. At full power, it's quite awesome. In fact, what I'm doing right now is factoring out the chatbot AI and use it by the regular AI. And you can get the source and build it yourself. Sorry, that's how it is with bleeding edge features.
And the chatbot is already better. It's just up to the server admin to unlock it. At full power, it's quite awesome. In fact, what I'm doing right now is factoring out the chatbot AI and use it by the regular AI. And you can get the source and build it yourself. Sorry, that's how it is with bleeding edge features.
-
- Average Program
- Posts: 71
- Joined: Fri Mar 07, 2008 1:05 am
-
- Average Program
- Posts: 71
- Joined: Fri Mar 07, 2008 1:05 am
-
- Average Program
- Posts: 71
- Joined: Fri Mar 07, 2008 1:05 am
Those bits that work are in a somewhat presentable state now, so I put a server with the predictable name "Botfarm Fortress" up. You'll fight against three AI players, two attackers and one defender. The attackers have the courtesy to attack one after the other (that's totally not just so because they'd kill each other if they attacked at once, oh no) and don't grind to put early pressure on you (again, not because they can't).
My personal record is surviving one attacker ;/ I suck.
My personal record is surviving one attacker ;/ I suck.
Re: It's about time! Fortress AI
I have questions!
I had luke set up a server with this branch, but I don't really know anything about it. Is there a AI file, like aiplayers.cfg? If so, are there new states in it (attack, defend)?
I had luke set up a server with this branch, but I don't really know anything about it. Is there a AI file, like aiplayers.cfg? If so, are there new states in it (attack, defend)?