English New Bot System - Testing Version Released

89 replies
Goto Page
To the start Previous 1 2 3 4 5 Next To the start
Up
Ortimh
User
Offline Off
I'm currently unsatisfied with our current bot system. It's pretty good I know, but I'd like it to be more human-like. I have ideas in mind that I could implement. I rewrote the system from scratch, trying to scratch what kind of things that I could do with current bots, but as you know CS2D has many limitations and I couldn't make big changes as I want it to be. My current plans are as following.

• Behavior tree: Behavior tree is a control system that could be used in AI. It could test many cases (added manually) and create actions on how to react to the cases. I have read many articles and I wonder how I could implement this one in CS2D, because I don't want to end up using too many tables just to simulate classes. It's too extreme.
• Hiding/sniping/camping spots: In CS, there're so-called hiding spots. These spots are used by bots when they're on danger or something. I want to include this to the system by adding additional file to map (like navmesh in CS) that contains a table of hiding spots locations. I might add an automatic system that scans a map for hiding spots.
• Reacting to noises: This one is a beast. I don't know how to implement this one, but additional hooks might be a good idea. I might use cs2d lua hook attack and cs2d lua hook break hooks and send a signal to all bots where it's fired, and add appropriate response on the signal.
• Danger: Another game-changer feature that might be hard to be implemented. "Danger" is restarted every spawn and only be added when a teammate dies. It changes on how bots take a "go-to" point.
• Morale: Feature that could kill me. This one doesn't restart every spawn and calculated on the bot's lifetime. Morale is increased when: kills an enemy; completes an objective; and is on the winning team. While it's decreased when: is killed; and is on the losing team. It determines whether to "rush" or "camp".

Maybe there're tons of other features that I'd like to implement, but they're too small so I didn't list them on the game-changing features list. I started this work since 2 days ago, so when to add "danger" and "morale" are already added (not when to use them). It might take a long time. Don't lose hope because this project passionates me a lot (especially after making this thread.. don't want to make you hopeless, aren't we?), and giving experiences on how to deal with AI when working on my own games. Giving me support would boost my work too.

Maybe you have ideas in mind that I could implement too? That'd be great. Don't ask for weapon profiency, how to take path, etc. because CS2D has limitations as well. Or do you want to help me in this project, on any aspect? All help are appreciated.
edited 1×, last 20.07.17 12:36:03 pm
I'm awesome ... and I really like cookies.
19.06.17 01:43:07 pm
Up
_3yrus
User
Offline Off
Its also will be great if a bot take better gun than himselfs on the grand.
here we go !
19.06.17 01:52:52 pm
Up
TimeQuesT
User
Offline Off
user Ortimh has written:
• Reacting to noises: This one is a beast. I don't know how to implement this one, but additional hooks might be a good idea. I might use cs2d lua hook attack and cs2d lua hook break hooks and send a signal to all bots where it's fired, and add appropriate response on the signal.


I like that idea. Anyway to detect noise, you actually have to scan for every action that emits sound. Like checking if a player is walking, reloading, shooting etc. Yep, this will be alot of work.

This might be a realized with a table storing all sound events for 1 frame. This includes : position, volume. (volume is determined in the specified hook that adds the entry)

Wish you good luck with that, and hoping to hear new stuff about this project in future.

(This looks like you try to rewrite the CS:CZ bots :D) [Best gaming AI I have seen so far]
Muh
19.06.17 01:58:43 pm
Up
Ortimh
User
Offline Off
@user _3yrus: Yeah, I already think so too. Thanks for that anyway.
@user TimeQuesT: If I need all of those check-ups then this bot system couldn't be played in online mode at most. Anyway walking IS the way to avoid creating noises and reloading is not really that important to react. Thanks for the idea of the implementation, I'll think about that. Also yeah, I'm reading a "bot design" PDF from someone who was creating CS:CZ.

If anyone interested on "the making of bots for CS:CZ", here's The Making of the Official Counter-Strike Bot PDF file.
I'm awesome ... and I really like cookies.
19.06.17 02:23:50 pm
Up
_3yrus
User
Offline Off
I think the biggest bug bots include is when fog of war id off u can see bots but they arent able to do that.so u easily can kill them.and i think its not hard to be solved it is ??
here we go !
19.06.17 02:31:13 pm
Up
Ortimh
User
Offline Off
@user _3yrus: Yeah, I'm already fully aware of that. I'm addressing that, and right now I fucked up the bots. I'll fix it soon.
I'm awesome ... and I really like cookies.
19.06.17 03:51:36 pm
Up
PeculiarLookingLink
User
Offline Off
@user _3yrus: But,what about old resolution users?I think this will make the bots easily killing 4:3 (or whatever) users.
Inactive dude
19.06.17 04:36:33 pm
Up
Ortimh
User
Offline Off
@user PeculiarLookingLink: 4:3 resolution users still get 16:9 resolution but smaller (4:2.25 ratio) so I think it'll be fine.
I'm awesome ... and I really like cookies.
19.06.17 05:35:33 pm
Up
_3yrus
User
Offline Off
I think we have to make a revolution in cs2d bot system !!
here we go !
19.06.17 06:03:06 pm
Up
Mami Tomoe
User
Offline Off
We need to make bots 10 times better! So they scary
Now bot is like newbie with aimbot!

AND they use FLASH! To HEAR me too!
flash hook
fish
19.06.17 06:49:02 pm
Up
Ortimh
User
Offline Off
I'm done with auto-find hiding spots, but basically what it does only search for corners. Anyone wants to look at the code, click on the spoiler. This one might be my test tool only but if you want it to be a thing.. but.. let's focus on the bot system first. As you can see (or no), I'm going for spots file type. It's not preferable to use this auto-find script. Hiding spots must be added manually because human minds are better..
Spoiler >
I'm awesome ... and I really like cookies.
19.06.17 07:27:31 pm
Up
Masea
Super User
Offline Off
Good project, good luck

I've got one idea. That is to change the behavior of bots by enemies' weapons. Like if the enemy has a close range weapon(shotgun), the bots will not get too close to them.
19.06.17 08:47:10 pm
Up
Pagyra
User
Offline Off
I think you should start doing an analytical system of recording in database all actions of players on each map.
To use this data in human-like behavior of bots.
19.06.17 08:50:28 pm
Up
Starkkz
Moderator
Offline Off
@user Pagyra: What would be actually fun is to train bots based on player actions via neural networks.
lol
19.06.17 09:36:20 pm
Up
gotya2
GAME BANNED
Offline Off
What would be nice too:
-Bots can aim outside of screen camera, based on "hearing".
-The further the shooting distance, the worse the accuracy.

I've actually already implemented this to make the bots more challenging.
All your other plans require support from the map editor / DC.
19.06.17 10:47:10 pm
Up
TimeQuesT
User
Offline Off
Heyo user Ortimh, I started working on a sound-lib. Yet it works very fine. Weapon volumes still need's tweaking. Unfortunately I had to use the "move" hook to detect walking. Sound list is cleared every 4th frame via a timer.

Since now it detects:
• breaking walls
• shooting
• running
• reloading

Sound volume reduces with the distance to the listener (linear).

I might implement more stuff and investigate time into acoustic physics if you're interested (yet, math done is very primitive).

You can get the script HERE
An example can be found HERE
(makes enemy bots going towards the position where they last heared you.)

Ps: The only function required for controlling bots is: snd.FindSound(searching_player_id)

Known Bugs:
Knife is loud as fuck
A non silenced usp can be marked as silenced by silencing and dropping it. Afterwards buy a new one. It is handled as silenced.
Muh
19.06.17 10:55:09 pm
Up
Avo
User
Offline Off
user Starkkz has written:
@user Pagyra: What would be actually fun is to train bots based on player actions via neural networks.

I second this. Some ML stuff would be really nice.
Trust me, I'm an engineer | user DC approved file cs2d Super extra mod for CS2D (64), yeah!
20.06.17 12:53:19 am
Up
Ortimh
User
Offline Off
@user Masea: Yes, that would be great. Thanks for the kind words.
@user gotya2: Yeah, your ideas are parts of my plan. Thanks.
@user Pagyra, user Starkkz, user Avo: Welp that's an overkill feature for me. Even in original CS they hard-coded the bots. It's impossible to lay my hands on it because it's really time-consuming.
@user TimeQuesT: Wow, man. Thanks. It really helps me out and opened my mind a bit. Will see what I can do.
I'm awesome ... and I really like cookies.
20.06.17 04:50:49 am
Up
Zeik
User
Offline Off
For the noise events it would be something like this with OOP:
Spoiler >
20.06.17 10:30:40 am
Up
Ortimh
User
Offline Off
@user Zeik: Another code that opened my mind! Thanks. But actually I won't be using OOP for the sake of raw speed.. but I'll see what I could implement. Also fun fact, your code might open the possibility to do
bots[1]:new('lol'):new('lol'):new('lol')...
..
I'm awesome ... and I really like cookies.
To the start Previous 1 2 3 4 5 Next To the start