Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Shockbot - taking its first steps Goto page 1, 2, 3, 4, 5 Next

| Inside3d Forums Forum Index -> Artificial Intelligence

View previous topic :: View next topic
Author | Message
--- | ---
Electro Joined: 29 Dec 2004 Posts: 241 Location: Brisbane, Australia |

Posted: Tue Nov 06, 2007 9:54 pm Post subject: Shockbot - taking its first steps |

Hello peoples! I have been casually working on a bot for the past couple of months in the minimal spare time I have. Here's a short clip of it playing a 3 "player" ffa on dm4: http://www.youtube.com/watch?v=zycwWMylaTA Currently the bot supports any maps that don't have buttons or fancy lift things. This will obviously change as the bot is in its infancy. It currently has no concept of ledges (and therefore no avoidance of them) or jumping ai aside from a node being flagged to say 'jump' when the bot reaches it.
The bot is as close to a real client as you can get currently. No rankings stuff in qc, physics stuff is handled in the engine like real clients (no physics present in qc, aside from being in DP atm so it has sv_user.qc).
Node files for levels are external .node files that are loaded in on map load.
Bot personality files are external .bot files that contain a large amount of personality information for each individual bot made with my quick little app I have thrown together (viewable here - http://www.bendarling.net/downloads/shockbot/ShockbotProfileEditor.exe : requires .NET framework to use)
Both the app and the bots are a work in progress, and currently the bots have ridiculously good aim so aren't in a playable state by humans, although they have good fun against each other
At the moment the bots only use the name/shirt/pants/sensitivity information from the .bot file, but as i add features to the bot, obviously they will be making use of more and more values, until they're all being used. Hopefully it should greatly assist in making them a lot more human-like, as well as varying each bots playing abilities and styles drastically.
_________________
Unit reporting!
http://www.bendarling.net/

Back to top |

Urre Joined: 05 Nov 2004 Posts: 1073 Location: Sweden |

Posted: Wed Nov 07, 2007 8:09 am Post subject: |

I must say I was quite impressed, some of the smoothest Quake bot play I've ever seen. They move very convincingly, except for being able to round corners running backwards for long periods of time. I didn't even mind them falling in the lava a couple of times since it seemed to me they just made simple mistakes, which anyone could do. Their aim was, as you said, inhumane. That rocket hit in the air at the beginning was like whoa, aimbot! *goes on to wonder if bots can use aimbots*
Anyhow, I'm glad to see you didn't get caught in the navigation swamp, like I did for Urrebot, so the poor thing never got any real AI. It all really does boil down to what you as a player percieve it as. Who cares if the thing has the most advanced navigation routines ever if it moves stiff, aims stiff, and has no decision making beyond which items to pick up. Does it come with a waypoint editor?
Good show, keep it up!
*goes on to code game-state and buildings*
_________________
Look out for Twigboy

Back to top |

xaGe Joined: 01 Mar 2006 Posts: 329 Location: Upstate, New York |

Posted: Wed Nov 07, 2007 2:31 pm Post subject: |

..They really do move smooth! It looks more like a match between real players then bots... Good stuff...

Back to top |

Orion Joined: 12 Jan 2007 Posts: 413 Location: Brazil |

Posted: Thu Nov 08, 2007 11:10 pm Post subject: |

Really impressive! Very human-like movements! When you finish them, will you release the source code too? Are they easy to plug into mods? Is there a check you did to the bots don't go into lava or slime? Or are they waypoint-oriented? I can't play with my bots in maps that have much lava or slime, they go into lava like there's a floor.
_________________
There's no signature here. Stop looking for one.

Back to top |

Electro Joined: 29 Dec 2004 Posts: 241 Location: Brisbane, Australia |

Posted: Fri Nov 09, 2007 12:07 am Post subject: |

Quote:
They move very convincingly, except for being able to round corners running backwards for long periods of time.

What is currently being implemented is to be considered the highest skill level of the bot. Bots that have lower skill levels in the appropriate fields won't be able to be moving like that, it really depends on how their individual personalities are

Quote:
I didn't even mind them falling in the lava a couple of times since it seemed to me they just made simple mistakes, which anyone could do.

Once the ledge avoidance and jumping ai is in, hopefully they won't fall into the lava unless knocked. Again this'll be based around their skill level as to how accurately they'll be able to do such things.
It's really difficult to try and not get caught up in any one element of the bot. I've been trying to plan each system a fair bit before i go about touching the code at all. Then once the problems popup when multiple systems are in place and conflict with each other or whatever (cannot be avoided in some cases) then those needed to be patched to work well together. Nothing that can't be overcome really
I'd still consider the aiming of shockbot pretty stiff, there's lots I want to do like acceleration/deceleration of their aim based on speeds, distances from desired angle... and all sorts of things, there's a BIG list to try and emulate human style aim. My goal is for them to look as human as possible. Currently they have rather linear looking movement, it's smooth... but still not as human-like as i'd like
Yeah there's a node editor, heavily frikbot inspired (how do you improve upon perfection? :S ) The code is all from scratch.. and probably has bugs as a result! hehe

Quote:
..They really do move smooth! It looks more like a match between real players then bots... Good stuff...

heheh that's one of my main goals! To make them appear human... ridiculously so. A heavy thing i'll be focussing on is teamplay, right down to team communication, bots will guard items for teammates, and co-ordinate attacks simultaneously etc. Ganging up like good human players do

Quote:
When you finish them, will you release the source code too? Are they easy to plug into mods?

They're extremely easy to plug into mods (maybe 5 lines of code?!), provided the engine being used supports the extensions. I'll provide a list of extensions required to have an engine that will run the bot soon.
I'm rather reluctant to release the source because I don't want to be competing with frikbot and frogbot, both which are great bots and have been used in lots of mods. Especially considering as frikbots main focus is to be a plug-in friendly mod. (frogbot is more of building the mod into the bot, not adding the bot to a mod hehe)
The bots use nodes to navigate. At the moment the combat behaviours are rather basic so they don't tend to deviate from their paths a whole lot. Once the combat ai is improved upon (after the ledge avoidance is in) it shouldn't be a problem.
The bots will be able to reverse rocket jump out of lava on dm4 like human opponents. Each bot has a skill for doing special moves in maps, so this will be taken into account like real humans.. not all of them will be able to do it
Thanks for the feedback so far! Really appreciated. It's the kind of feedback that will keep me trying to find spare time to work on them more to strive for that very first public release
_________________
Unit reporting!
http://www.bendarling.net/

Back to top |

Sajt Joined: 16 Oct 2004 Posts: 1026 |

Posted: Fri Nov 09, 2007 12:34 am Post subject: |

It would be nice to see an first-person spectate view of the bots playing _________________ F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.

Back to top |

Orion Joined: 12 Jan 2007 Posts: 413 Location: Brazil |

Posted: Fri Nov 09, 2007 12:51 am Post subject: |

Electro wrote:
They're extremely easy to plug into mods (maybe 5 lines of code?!), provided the engine being used supports the extensions. I'll provide a list of extensions required to have an engine that will run the bot soon. I'm rather reluctant to release the source because I don't want to be competing with frikbot and frogbot, both which are great bots and have been used in lots of mods. Especially considering as frikbots main focus is to be a plug-in friendly mod. (frogbot is more of building the mod into the bot, not adding the bot to a mod hehe)

Glad to know that they're easy to plug into mods!
Does the bot run on any engine or should the player have a specific engine?
If you want you can release a beta version...
_________________
There's no signature here. Stop looking for one.

Back to top |

Electro Joined: 29 Dec 2004 Posts: 241 Location: Brisbane, Australia |

Posted: Fri Nov 09, 2007 3:46 am Post subject: |

Sajt: when the aiming is fixed up to be what i want Orion: they require a bunch of extensions to work, currently Darkplaces i the only engine to have them working correctly. FTE is close to having them work, but still not unfortunately. A beta release would imply that i know what the final release would be... and i have no idea what that is
I will release them in version numbers, and the first release will be when i consider them to reach first playable.
_________________
Unit reporting!
http://www.bendarling.net/

Back to top |

Orion Joined: 12 Jan 2007 Posts: 413 Location: Brazil |

Posted: Fri Nov 09, 2007 3:52 am Post subject: |

Nice. Too bad that DP runs a bit slow here, even if I set minimum graphics. The only DP engine that runs good is the very first build (2002)... Does the bot only run in the latest DP engine? EDIT: Here's a way to make the bots have realistic aim, I use this with my own:

Code:
void() set_aim = { local vector dir; local float dist; dist = vlen(self.enemy.origin - self.origin) * 0.001;
// more realistic aim - independing of the weapon, the bot will fire or behind or infront of target
if (self.enemy.velocity)
dir = normalize( (self.enemy.origin + self.enemy.velocity * (crandom()*dist)) - self.origin);
else
dir = normalize(self.enemy.origin - self.origin);
self.v_angle = vectoangles(dir);
self.v_angle_x = self.v_angle_x * -1;
while (self.v_angle_x < -180)
self.v_angle_x = self.v_angle_x + 360;
while (self.v_angle_x > 180)
self.v_angle_x = self.v_angle_x - 360;
};

Probably your bot aiming code is different...
_________________
There's no signature here. Stop looking for one.

Back to top |

xaGe Joined: 01 Mar 2006 Posts: 329 Location: Upstate, New York |

Posted: Fri Nov 09, 2007 4:07 am Post subject: |

..I might be wrong, but quite a few cycles ago I thought it was you Electro that played with the idea of improving the FrikBot when it came to CTF play via a mod or something... ..If so is this what prompted you to maybe start your own bot? ..Either way my next question might be obviously... ..I know its early in Shockbots life cycle, but is CTF style play something you have in mind, farther down on the list or on the list at all..?

Back to top |

Electro Joined: 29 Dec 2004 Posts: 241 Location: Brisbane, Australia |

Posted: Fri Nov 09, 2007 4:18 am Post subject: |

Orion: my bot already has leading/prediction for projectiles... the WHERE to aim isn't a problem... it's the how to get there Currently they turn smoothly.. but at a constant speed (based on the bots sensitivity value), i will be doing a lot more in-depth stuff with it when i get the time.
xaGe: yeah FrikbotCTF i did waaaaaay back Don't know where that ended up!
No, it's not what prompted me to work on my own bot. I've always liked AI, but have just been nothing more than fascinated by it... I've always had ideas of how to do things but never put them in to practice. Shockbot is me putting my ideas to practice
Shockbot will be able to play CTF. Ideally, the bot will be able to play in q2 and q3 modes. No this won't be run with q2 and q3, still everything in the progs.dat that's needed code wise.... but doing something as simple as dropping in the q3 pak0.pk3 and running an engine that can support the bot, load md3's and q3bsp files... and bam - http://www.bendarling.net/downloads/shockbot/screenshots/shockbot000001.jpg
Will be able to play with q1 weapons on q3 maps, q3 weapons on q1 maps... q2 weapons on q1 maps... q2 weapons on q3 maps.. you get the idea.. will be able to mix/match everything. Also the player physics if everything goes to plan
Bots will be able to take orders, give orders.. communicate with each other etc.
_________________
Unit reporting!
http://www.bendarling.net/

Back to top |

Urre Joined: 05 Nov 2004 Posts: 1073 Location: Sweden |

Posted: Fri Nov 09, 2007 8:13 am Post subject: |

Awesome shit mate, looking forward to a release. I must say it's really inspiring, to see something like this, hopefully I will also get a chance to work on some form of bots or otherwise cool combatants some time again. I stopped working on Urrebot because of speed issues (it turned out to be slower in practice than waypoint-based bots, even though the goal was to be faster), but I have since then had oh so many ideas for bots, and not limited to navigation either
I recall you said this was supposed to be a QW bot, did you give up on that plan?
_________________
Look out for Twigboy

Back to top |

Electro Joined: 29 Dec 2004 Posts: 241 Location: Brisbane, Australia |

Posted: Fri Nov 09, 2007 8:41 am Post subject: |

Shockbot will work in both NQ and QW Glad to hear I'm inspiring some people. _________________ Unit reporting! http://www.bendarling.net/

Back to top |

redrum Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York |

Posted: Sat Nov 10, 2007 12:58 pm Post subject: |

In QW, will ShockBot transfer from map to map??? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500

Back to top |

Orion Joined: 12 Jan 2007 Posts: 413 Location: Brazil |

Posted: Sat Nov 10, 2007 2:05 pm Post subject: |

I think so... Electro said that the bot uses commands from the engine, it should have specific extensions that only some engines have, I think the bot won't work for regular QW client but will work for FuhQuake or EzQuake. But I think the bot will transfer from map to map and even use setspawmparms() on themselves... right Electro?
_________________
There's no signature here. Stop looking for one.

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> Artificial Intelligence | All times are GMT Goto page 1, 2, 3, 4, 5 Next
Page 1 of 5

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group