1

Topic: [SUGGESTION] How to make the bots more intelligent ?

Is there a way to prog the Bots better?
Does anyone know how to do this.

This weekend I will visit my grandma and theres no Internet connection.
But I have to train teewars in this time with some bots.

Thx

2

Re: [SUGGESTION] How to make the bots more intelligent ?

There are no real bots in Teewars. My guess is that it never will be.

3

Re: [SUGGESTION] How to make the bots more intelligent ?

but there are some bots on my server if I enable
dgb_bost=1
in the config file

And these bots should be coded better.

4

Re: [SUGGESTION] How to make the bots more intelligent ?

Is there a way to prog the Bots better?

Of course: just code your own))).

Don't try to catch the Night !
Useless simplifications is worst enemy of simplicity. (C)

5

Re: [SUGGESTION] How to make the bots more intelligent ?

oh I will but if there's someone who already did it then I
could save a lot of my time ;-D

6

Re: [SUGGESTION] How to make the bots more intelligent ?

>>oh I will but if there's someone who already did it then I
could save a lot of my time ;-D

No, no, more choice = better.

Don't try to catch the Night !
Useless simplifications is worst enemy of simplicity. (C)

7

Re: [SUGGESTION] How to make the bots more intelligent ?

dbg_bots = debug bots.. not actual bots. they are just dummies for testing various stuff. And I won't spend the heap of time that it will take to create bots that you can play against. There is better use of my time.

8 (edited by bullet 2008-02-22 23:20:57)

Re: [SUGGESTION] How to make the bots more intelligent ?

Bots are probably really hard to write for Teewars as the movement is complex. If you want bots behaving like "nameless tee" it probably takes a few hours but if you want bots that are an actual challange - good luck WuDDjA wink

Edit: Addressed wrong person.
Edit2: I shall think before posting.

9

Re: [SUGGESTION] How to make the bots more intelligent ?

Just a suggestion here, but maybe a dummy option? Like a kind of bag or something you can hit and grapple and put in with yourself to practice aim?

No, that is not me; it's just a figment of your imagination.

10

Re: [SUGGESTION] How to make the bots more intelligent ?

These dbg_bots=x basically are that way. You can kill and grapple them.

11

Re: [SUGGESTION] How to make the bots more intelligent ?

Ah, so just non-moving bots. I was thinking more like sacs of something that you could hit and grapple. Spawn them in places/ make them move up/ down, left/right. For aim. smile

No, that is not me; it's just a figment of your imagination.

12 (edited by clasic_traveller_diehard 2008-02-23 00:09:06)

Re: [SUGGESTION] How to make the bots more intelligent ?

Ooo!Ooo! i have an idea for a "teeball"(not baseball) game mode
drag the bot/ball to you goal and kill it there (or in 0.4.0 throw it against the goal/lava tile)

my name is NOT clasic_traveller_die its CLASIC_TRAVELLER_DIEHARD classic traveller is a si-fi rpg from the same era as dungens and dragons lookit up on wikipedia smile

13 (edited by raph 2008-03-01 06:31:34)

Re: [SUGGESTION] How to make the bots more intelligent ?

i parsed pieces of the Q3 bot source code (movement, enemy tracking, weapon priorities) into the TeeWars source, then compiled it with... questionable results...

Long story short, game crashed.

Ah well, drawing board time smile

14

Re: [SUGGESTION] How to make the bots more intelligent ?

Now I'm curious, the way you say that, it souns like "I opened bot.cpp in Teewars in pasted bot.cpp from Q3" which wouldn't work out, so what did you do exactly?

15

Re: [SUGGESTION] How to make the bots more intelligent ?

i didnt just copy the file, that would be stupid and wouldnt work on account of Teewars not being Q3.

I tried to create appropriate console commands and directory heirarchy into something i thought would work. Then i gathered the bot source from Q3 and some other tidbits from a few other 2D platformers with bots, and attempted to create something from that. Obviously, the bots couldnt move along the z axis, so i had to delete most of the Q3 bot source for movement.

My goal was to make the bots fire the gl in such a way that it would hit its target no matter the targets speed or position, so long as there was a clear shot. What i ACTUALLY got was a bot that shook on the spot and cycled through weaponry really really quickly. No better than what was already in Teewars.

And, like i said, this made the game crash whenever anything altered the bots, like getting shot, jumped on, hooked, etc..

16

Re: [SUGGESTION] How to make the bots more intelligent ?

Hi there,

It's a very nice idea to make a bot for this game !
Here are my ideas about that.

1- MOVING and DISCOVERING ENVIRONMENT
I think that the first thing to do for creating a bot is helping it to know where it cans go and how it cans reach some strategic points. Maybe one solution would be to automatically generate a pathfind graph by analyzing the topology of the map.

2- DECIDE WHAT TO DO.
It should also have motivations, such as attacking, hiding, avoiding bullets, escaping, getting health, getting armor, getting munitions, getting new weapon. Theses motivations should run concurrently and depends on the environment and the bot's status.

3- DO
The last thing is to implement each one of these behaviors.

17

Re: [SUGGESTION] How to make the bots more intelligent ?

make the bots get PHD

18

Re: [SUGGESTION] How to make the bots more intelligent ?

you can't play wirh bots on a server without internet
you need internet to connect to a server
It will be a good idea to make something where you can play all maps you installed without internet and without a server. I mean on you own pc.
sry for my english

Sorry for my english; typical germans ;-)

19

Re: [SUGGESTION] How to make the bots more intelligent ?

Doctor of Philosophy = PHD? 

[/me rolling on the floor laughing]

20

Re: [SUGGESTION] How to make the bots more intelligent ?

just imagine........ Bubblebot PHD esq.

21

Re: [SUGGESTION] How to make the bots more intelligent ?

Bots are tricky because they require a certain amount of AI. There a number of different systems for this, and they're all quite complex. Trying to get them to interface with the environment is a chore all by itself.

Technical issues aside, a bot should do three main things:

Search
Engage
Recover

You can modify each one of those to do something more complex. For example, during the search phase, it would follow that if the health was below a certain threshold, the bot would search for health. This also opens up opportunities for different bot behaviors: armour stockpiling, for example, or an obsessive healer.

The search phase would also be the primary time for the bot to try to find a target. Ideally, it pursues the same target unless that target leaves it's range and a new one enters its range. This way, the bot won't shoot at the closest thing it sees. Similarly, a bot should return fire at someone whose shooting at it. Like before, this behavior needs to be adjusted so that the bot doesn't ignore everyone else. There are multiple ways of accomplishing this, like weighting behaviors for priority or simply hard-coding behavior.

Once a bot has found a target, it switches into the engage mode. This basically boils down to calculating trajectories for bullets to make sure the target is hit. This would including not trying to shoot through walls and picking the right weapon for the job. You'd obviously need to add a certain amount of randomness to this so the bot isn't dead-on every time. One behavior I notice in a lot of players is that they aim up and start shooting, and then bring the gun down to the aiming level.

If the target leaves the range, the bot is significantly weak, or is out of ammo (again, this could a point of modified bot behavior: if it runs out of ammo in one weapon, switch to another, and then another), enter the search phase again only if the ammo of the weapons, health, or armour are above a certain threshold. If they aren't, the bot should look only for health or ammo, returning fire only defensively and without pursuing targets.

Naturally, all of these could be tweaked and modified to suit the needs of the players. These behaviors are common to all players, and to my own strategy. I'm by no means the best Teewars player, but I'm good enough that I think these traits would provide a robust bot.

22 (edited by willou 2008-03-07 13:30:23)

Re: [SUGGESTION] How to make the bots more intelligent ?

@GSD,
What you're describing sounds to me like a Finite State Machine, which is not bad, but hard to tune compared to concurrently running goals with motivations.

Anyway, in my opinion, the hardest part is not the logic, but as you said the integration in environment (making it moving and shooting).
The first thing may be to write a perception layer to simulate the bot's field of view (bonuses, enemies, projectiles).

Any hint from the developers for topology of the maps and trajectories anticipations ? (like "there is this function in this file that you could use to..")

willou

23 (edited by Chrono Syndrome 2008-03-07 13:36:55)

Re: [SUGGESTION] How to make the bots more intelligent ?

2Mat: "good bots" is a compex definition... Yes, there are already invented bots, which is impossible to kill (even with same characterstics as player). Bots designed to lose, trying to win hardly. One of best variants, IMHO, described here: http://www.game-exe.ru/reviews/12273/

P.S. ???? ??? ????? ??????????? ??????? ???????? ? Core Wars, ?? ??? ?? ????? ?? ? ??? wink...

Don't try to catch the Night !
Useless simplifications is worst enemy of simplicity. (C)

24

Re: [SUGGESTION] How to make the bots more intelligent ?

Okey, this is a very very complex topic with many different approaches. It's useless to talk about high-level strategy like hide, seek and gather if you haven't solved the low-level stuff.

The first step, and perhaps the most complicated is how to make the movement AI. How to make a bot go from point A to B. Without solving that issue, there won't be much bots. Perhaps you can get quite far by using some sort of adaptive A* algorithm to plan the path by simulating the movement but I think it will be quite hard because of the hook movements in the game. The risk is also that this will be very cpu intensive. To this you can add weights of how much danger you put yourself in by taking a specific path and weight it against how much risks how can take due to health, armor etc.

I'm very tempted to fiddle around with this but I won't do anything because there is loads of stuff that is more important then doing bots but you are welcome to try smile

25 (edited by willou 2008-03-07 15:53:03)

Re: [SUGGESTION] How to make the bots more intelligent ?

Considering the fact that moving is very tricky (because of the hooking movement as you pointed), maybe a machine learning or a genetic approach could be relevant ?
Only once the learning is done, the pathfind can be tried.