1 (edited by rand() 2016-01-13 18:20:39)

Topic: [MOD] Vanilla with bots

Hi all,

I introduce to you the bCTF/bTDM/bDM mod. It's a vanilla gametype with server side bots on it.
I used the AI of my bot (see https://www.teeworlds.com/forum/viewtopic.php?id=11397) and mixed it with the server source.

Im not releasing the source yet, for the same reason I didn't release the client version source (neither binaries).
Since I dont see any reason not to share the server binary…

See Links

I'll release the source, when it's clean enough and I judge that haters gonna love it (basically, when the AI highly depends on server sources)
Edit: now, it's fine
-> https://github.com/nheir/teeworlds/tree/bMod

The server checks every tick if there is a slot that a bot can take.
Players got the priority over bots.
Bots are not seen in server browser and don't count in vote.

Using sv_bot_slots greater or equal than sv_max_clients - sv_spectator_slots can prevent spectators to join.
Bots are not supposed to spectate (but they can with set_team_all) I have to do smth about this.

You can also test the mod on the server : Random | with ai bot() (testing) | Server mod version
(or join the 0.7 server)

Commands

    sv_bot_slots = maximum number of bots on the server
0.6 only
    sv_bot_skin = skin of the bots
0.6 and 0.7
    sv_bot_allow_hook = allow using hook
    sv_bot_allow_move = enable bot moves
    sv_bot_allow_fire = enable weapons handling
    sv_bot_draw_target = show bot target and path (debug)
    sv_botengine_draw_graph = show underlying graph (debug) (depends on version, it's for debug use so it may draw something else)

Link

0.6 version: teeworlds_srv.0.6.bMod.win32.exe Windows 32bit (untested)
0.6 version: teeworlds_srv.0.6.bMod.x86 Linux (32bit)
0.6 version: teeworlds_srv.0.6.bMod.x86_64 Linux (64bit)
0.7 version : teeworlds_srv.0.7.x86_64.tar.gz (Linux x86_64)

2 (edited by xush 2015-10-16 17:57:27)

Re: [MOD] Vanilla with bots

Have seen better, not-so-overpowered bots. Sorry, but this mod is not good to me, we have had this before just with nicer bots.

Even though it is nice to see your way of pathfinding.

Real programmers don't comment their code - it was hard to write, it should be hard to understand.
Proudly verkeckt since 2010.

3 (edited by SandSnake 2018-04-23 09:17:25)

Re: [MOD] Vanilla with bots

Very nice project!

4 (edited by rand() 2015-10-16 18:28:32)

Re: [MOD] Vanilla with bots

@xush, the main part of the bot is indeed path finding. The AI when seeing enemies is still simple/stupid.
And, i deeply agree with that part, i don't like playing against my bot. It's a mix with predictible and overpowered. I only got satisfaction seeing it playing alone ^^
I still got satisfaction from it, and some tees like it and want to play with it big_smile

5

Re: [MOD] Vanilla with bots

I tested it. the bots are way too powerful. (I'm probably not best of any player, but it ended up 30:5 when playing bDM). also the "2 bots" are not working.

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

6

Re: [MOD] Vanilla with bots

Thanks Schwertspize, that's fixed (moreover this bug led to a segfault when the first player leaves…)

7

Re: [MOD] Vanilla with bots

Some updates about the bots.
I rewrite the construction of the underlying graph of the path-finding.
I m not sure about this point but the goal is too make path-finding to anything on the map easier.
In fact, the previous graph make smooth path from waypoint to another but it was not compliant with path from/to any other position.

I use corners of the map to make polygons that I triangulate and the graph is made from triangles centroids.
If the bot target a player, it will compute a path to him.
Weapons handling are a way smarter (it becomes the costliest part of the AI). Basically, the bot tries to fire in 32 directions for gun/grenade/shotgun, and predicts the positions of each enemies and compute collision. It choose the first direction/weapon that harms a tee (still ignoring friends)

For my needs i did another way to compute collision that interested people can find there : https://github.com/nheir/teeworlds/commits/segments

From callgrind trace, it is 10x faster on average but there is more L1 miss. The collision is not a big part of computation in vanilla though.

I made this modification in the 0.7 version so no change in 0.6 but you can test it with a 0.7 client. (195.154.80.148:8304)

8

Re: [MOD] Vanilla with bots

Since 0.7 is not ready yet, I update 0.6 version so it's closed to 0.7 version.

The code becomes far enough from the bot client so I will release the code soon (removing commit history but at least one commit that sum up all the diff with vanilla)