Experimental AI plays CTF
#1
Greetings,
I experimented with a new AI for AC, plays CTF. Windows binary and source code here: http://sdrv.ms/UDvY20

Best regards!
Thanks given by:
#2
So you edited the source code? naughty naughty.

how do the bots behave? any better.
Thanks given by:
#3
(19 Jan 13, 11:11AM)MykeGregory Wrote: So you edited the source code? naughty naughty.
Ain't nuthin' wrong with a bit of source modding.

VonDrakula: can you post a video of this or something?
There's just something a bit suspicious about minimal information followed by an uninformative URL.
Thanks given by:
#4
AC Player
Posts: 1
Joined: Jan 2013
seedy link

yeah seems suss
Thanks given by:
#5
(19 Jan 13, 03:51PM)Frogulis Wrote:
(19 Jan 13, 11:11AM)MykeGregory Wrote: So you edited the source code? naughty naughty.
Ain't nuthin' wrong with a bit of source modding.

VonDrakula: can you post a video of this or something?
There's just something a bit suspicious about minimal information followed by an uninformative URL.

I will try and make a video when/if I have time. The zip file is on my SkyDrive, if you have any better idea for where to upload the code please let me know. The changes are all in one new file (ai.cpp, included in the zip, about 2700 lines o'code) and there are instructions at the top of the code for how to integrate it into the project using Visual Studio.

You don't have to execute the binary that I included if you think it's suspicious, it is there just for convenience.

I wrote this for my own amusement but I thought I'd be a good boy and share it with the community, maybe the devs want to borrow ideas / code.

Also: I made the bots crouch so one can play CTF on ac_aqueous ;) Also made a small gameplay change that can be turned off with a variable: the dead drop their primary weapons when killed which another bot or the player can pick up (unless it is of the same kind as the primary they carry in which case only the ammo is picked.)

Code is C++11 so requires Visual Studio 2010 to compile but it can be dumbed down if needed.

More bragging about this project here: http://the-free-meme.blogspot.com/

Best regards!
Thanks given by:
#6
I read your blog. I'll have to try this out when I can. Excellent work. Would it be possible to make a C++ compatible version (by rewriting the hypothetical wheel of the C++11 functions)?

Append: I get the no mono font specified error when swapping binaries. And is this based on the 1.1.0.4 code?

Append: Just read the readme. Sorry :P
Thanks given by:
#7
"the free meme"


even more sketchy :o
Thanks given by:
#8
I loaded it on ac_aqueous with wpxautogen on and wpxautodrop 0 and the CLA successfully at least gets to RVSF base. I loaded a few other maps and most of the time get "could not find waypoint near flag" error.

Picking up weapons is cool though I wish it were optional in a way besides avoiding the pickups.

Even if that feature in itself isn't added the thought of putting a weapon pickup itself into a map is interesting.

Did you add the bots doing voicecoms too or was that an existing feature?
Thanks given by:
#9
(19 Jan 13, 05:45PM)VonDrakula Wrote: [...]

Thanks !! It seems great. I didn't have time to test it though (jut gave a look to the code and your article).
The AI code is broken. We definitely need to work on it;

@Felix: it's based on 1.2.0.0 beta (at least that's what i understood reading the article).
Thanks given by:
#10
* Cleaner smells productive collaboration
Thanks given by:
#11
The sound was there I just added the code to play it.

(19 Jan 13, 07:28PM)Felix-The-Ghost Wrote: I loaded it on ac_aqueous with wpxautogen on and wpxautodrop 0 and the CLA successfully at least gets to RVSF base. I loaded a few other maps and most of the time get "could not find waypoint near flag" error.

Picking up weapons is cool though I wish it were optional in a way besides avoiding the pickups.

Even if that feature in itself isn't added the thought of putting a weapon pickup itself into a map is interesting.

Did you add the bots doing voicecoms too or was that an existing feature?

What is broken specifically? This is just experimental, WIP stuff and I do expect that I have some bugs in there but it would be more helpful to know what exactly you are referring to ;)

(19 Jan 13, 08:29PM)Luc@s Wrote:
(19 Jan 13, 05:45PM)VonDrakula Wrote: [...]

Thanks !! It seems great. I didn't have time to test it though (jut gave a look to the code and your article).
The AI code is broken. We definitely need to work on it;

@Felix: it's based on 1.2.0.0 beta (at least that's what i understood reading the article).

(19 Jan 13, 07:28PM)Felix-The-Ghost Wrote: I loaded it on ac_aqueous with wpxautogen on and wpxautodrop 0 and the CLA successfully at least gets to RVSF base. I loaded a few other maps and most of the time get "could not find waypoint near flag" error.

Picking up weapons is cool though I wish it were optional in a way besides avoiding the pickups.

Even if that feature in itself isn't added the thought of putting a weapon pickup itself into a map is interesting.

Did you add the bots doing voicecoms too or was that an existing feature?

The code that generates waypoints tries to be conservative and avoid generating paths that lead to collisions, so yeah, sometimes there are missing paths, that's why I included the wpxtest command. It can be worked around by setting wpxautodrop to 1 and adding waypoints "manually".

(19 Jan 13, 07:08PM)Felix-The-Ghost Wrote: I read your blog. I'll have to try this out when I can. Excellent work. Would it be possible to make a C++ compatible version (by rewriting the hypothetical wheel of the C++11 functions)?

Append: I get the no mono font specified error when swapping binaries. And is this based on the 1.1.0.4 code?

Append: Just read the readme. Sorry :P

The C++11 features I am using are the "auto" keyword and lambda functions, "auto" can be easily replaced and lambdas replaced with functor classes. Yeah, and replace nullptr with NULL. I used lambdas because the code is more concise this way. I'll try and make a compatible version when I have some time.
Thanks given by:
#12
Quote: @Felix: it's based on 1.2.0.0 beta (at least that's what i understood reading the article).

Yeah, I saw the readme and it said it in there. I guess I didn't notice it said in the article.

Quote:What is broken specifically? This is just experimental, WIP stuff and I do expect that I have some bugs in there but it would be more helpful to know what exactly you are referring to ;)

I'm pretty sure he was referring to the existing AI with "broken" actually meaning "incomplete".

The voicecomming is weird -- aside from the fact that these are bots using them. Usually the name doesn't show and when it does it is in red text for some reason.
Thanks given by:
#13
(19 Jan 13, 09:32PM)Felix-The-Ghost Wrote:
Quote: @Felix: it's based on 1.2.0.0 beta (at least that's what i understood reading the article).

Yeah, I saw the readme and it said it in there. I guess I didn't notice it said in the article.

Quote:What is broken specifically? This is just experimental, WIP stuff and I do expect that I have some bugs in there but it would be more helpful to know what exactly you are referring to ;)

I'm pretty sure he was referring to the existing AI with "broken" actually meaning "incomplete".

The voicecomming is weird -- aside from the fact that these are bots using them. Usually the name doesn't show and when it does it is in red text for some reason.

I thought not everyone may like that voicecomm idea.
Use "aisounds 0" to turn it off.

(19 Jan 13, 08:33PM)DES|Cleaner Wrote: * DES|Cleaner smells productive collaboration
Email address is in the source code.
Thanks given by:
#14
I like this.

I hope this can get into the official package. If you can make that happen, a bot campaign mode might actually occur.

I'm interested in getting this to work on every platform that AC currently supports. That would be awesome.
Thanks given by:
#15
Could we have the drop/pick up weapons system in SVN to see how it would fare in AC? I like the sound of this, although having the drop function binded to a key would be better.
Thanks given by:
#16
(20 Jan 13, 07:22AM)Aekom Wrote: Could we have the drop/pick up weapons system in SVN to see how it would fare in AC? I like the sound of this, although having the drop function binded to a key would be better.

One thing I'd like to underline is that my experiment is all client-side, haven't looked into implementing it on the server.
Thanks given by:
#17
(20 Jan 13, 07:28AM)VonDrakula Wrote: One thing I'd like to underline is that my experiment is all client-side, haven't looked into implementing it on the server.

Since you're dealing with bots, you don't need to deal with server-side stuff, which saves you lots of effort :D
(Unless you mean to have the ability to add bots in to multiplayer matches :O )
Thanks given by:
#18
(20 Jan 13, 06:48AM)Ronald_Reagan Wrote: I like this.

I hope this can get into the official package. If you can make that happen, a bot campaign mode might actually occur.

I'm interested in getting this to work on every platform that AC currently supports. That would be awesome.
Glad to hear you like the concept. I have some Linux and OSX experience and could port the code (I suspect it'd mainly involve makefile changes and some XCode project stuff) shouldn't be too hard. I'd like however to have a review of the design and of the algorithms involved. I think my waypoint system and the handling of collisions could be improved. For CTF I have some ideas I'd like to explore and get feedback on such as: how does the AI decide who goes for the flag and who stays guard behind? What routes to follow to the objective? Shortest path is not always a good answer, how to do tactical path find to avoid interception by the enemy? We can discuss in this forum or via email.
Thanks given by:
#19
(20 Jan 13, 07:54AM)VonDrakula Wrote: how does the AI decide who goes for the flag and who stays guard behind?

a simplistic way would be for the bot closest to the flag to go for it, or in the presence of a player allow for them to grab it.

(20 Jan 13, 07:54AM)VonDrakula Wrote: Shortest path is not always a good answer, how to do tactical path find to avoid interception by the enemy?

if you're looking to sneak past and grab a flag, you think about where all the opposing players are and what paths they're moving along, and thinking about where the missing players might be.

you may benefit greatly from watching a demo or two of competitive players playing the game in a match setting, and i'm guessing you could apply the logic of the players to the bots, even if its just simplistic stuff like having all the players moving along the correct sides.

heres a good one:
http://ac-weekend-cup.tk/media/demos/CTF...8_1910.dmo

if you need help breaking down the thought processes in the players ill be happy to elaborate
Thanks given by:
#20
@VonDrakula: I´ll take a look in some days. If it´s good it may get added (but more probably after AC 1.2).
Thanks given by:
#21
(20 Jan 13, 02:24AM)VonDrakula Wrote: I thought not everyone may like that voicecomm idea.
Use "aisounds 0" to turn it off.

I like the idea. It's just bugged.
Thanks given by:
#22
(21 Jan 13, 12:02AM)Felix-The-Ghost Wrote:
(20 Jan 13, 02:24AM)VonDrakula Wrote: I thought not everyone may like that voicecomm idea.
Use "aisounds 0" to turn it off.

I like the idea. It's just bugged.

Oh, you would like to see a message on screen not just the sounds. I can fix that. Should the message be displayed in the team's color?
Thanks given by:
#23
You MFKERs want a demo of Flag-Running?!?! Let me get hammered. I'll show you whats up! I may not frag like a BOSS... but who does anymore? I can run like a slut out of New Jersey. Scoring that shit like a solid hammerthrow! Paths and lines are what's important. It's all about judging the moment at hand.
Thanks given by:
#24
wow this is brilliant

although the picking up weapons sounds a bit odd

do these things pickup grenades?
Thanks given by:
#25
(21 Jan 13, 10:02PM)VonDrakula Wrote:
(21 Jan 13, 12:02AM)Felix-The-Ghost Wrote:
(20 Jan 13, 02:24AM)VonDrakula Wrote: I thought not everyone may like that voicecomm idea.
Use "aisounds 0" to turn it off.

I like the idea. It's just bugged.

Oh, you would like to see a message on screen not just the sounds. I can fix that. Should the message be displayed in the team's color?

If you played online and observed the use of those, you'd know the phrases are said with the say command and a lot of the phases are only visible/audible if you are on the same team as the one sending the message. The "team only" phrases are in a blue color.

The best way to test this is to open a team bot match and push [V] for voicecom and the corresponding numbers -- you'll see some are public and some are only on your team.

Aside from that you should filter out some triggers randomly cause they do it too often, even if the right sounds were muted.

You may have thought these commands were available as a sort of eyecandy/background noise like other FPS games but they are intended for communicating very specific messages and are manually triggered.
Thanks given by:
#26
(22 Jan 13, 09:35PM)Felix-The-Ghost Wrote:
(21 Jan 13, 10:02PM)VonDrakula Wrote:
(21 Jan 13, 12:02AM)Felix-The-Ghost Wrote:
(20 Jan 13, 02:24AM)VonDrakula Wrote: I thought not everyone may like that voicecomm idea.
Use "aisounds 0" to turn it off.

I like the idea. It's just bugged.

Oh, you would like to see a message on screen not just the sounds. I can fix that. Should the message be displayed in the team's color?

If you played online and observed the use of those, you'd know the phrases are said with the say command and a lot of the phases are only visible/audible if you are on the same team as the one sending the message. The "team only" phrases are in a blue color.

The best way to test this is to open a team bot match and push [V] for voicecom and the corresponding numbers -- you'll see some are public and some are only on your team.

Aside from that you should filter out some triggers randomly cause they do it too often, even if the right sounds were muted.

You may have thought these commands were available as a sort of eyecandy/background noise like other FPS games but they are intended for communicating very specific messages and are manually triggered.

Yes you are right I threw those in as eye/ear candy (albeit there is some correlation between the bots' actions and the messages).
I think it is best I remove those for now and focus on the AI proper. Once I get it past the proof of concept stage I can think about the voicecom. Thanks for your feedback.
Thanks given by:
#27
Really like this a lot, something thats been needed for a long time now. Keep up the good work. :)
Thanks given by:
#28
Quote:So you edited the source code? naughty naughty.

Modifying the source code is bad? How did this even become an idea? I'm no stallman, but I thought that the entire point of an open source project is that anyone can take the code and tinker and/or compile for themselves. Editing the source code is what moves the game forward!
Thanks given by:
#29
Nice, nice, finally someone checked this part of AC ;)
Thanks given by:
#30
(27 Jan 13, 01:13PM)Alien Wrote: Nice, nice, finally someone checked this part of AC ;)

Bots are far more intelligents since more than a year on SVN, even if it's not perfect, they are switching weapons and their moves are less stupids.

BTW: Check at 0:19 :D
Thanks given by: