Page 1 of 1

A.I. Discussion Thread

Posted: Thu Nov 17, 2016 8:08 pm
by Splinter
Hey guys. We're in Alpha! That means bots are coming, and I thought we could help the devs with the A.I. development. I don't know about you, but I'd like intelligent bots, and not just bots with perfect aim and impeccable blocks and dodges. Discussing basic game mechanics won't help at all, but maybe we can help by discussing strategy, predicting and decision-making. Here goes a huge post.

First, I had this idea of an intelligent bot having 3 "modes". Aggressive, Passive and Defensive. They can switch modes at any time, depending on the current situation. They will gather information from the game like:

-player weapons
-ammo (low/high on ammo)
-health
-dangerous zones (explosive barrels, mines, pits, falling objects, gib risk)
-open area (exposed to gunfire)/safe area (in cover)
-stamina
-active players: (1v1/3 players alive/4+ players alive)
-item boxes

Depending on those informations, they will decide if they should play Aggressive, Passive or Defensive.

-Aggressive
Description: The bot will attack immediately, shooting or trying to approach the enemies. They will also try to corner and pressure you and won't let you pick up items.
Conditions: They have health and/or weapon advantage, and can possibly acquire a good weapon, dominate an item spawn or even win the match with the kill.

-Passive
Description: The bot will camp or try to collect items, looking for a safe position, avoiding fights if possible. Basically their objective is surviving.
Conditions: The bot is not in big danger, but it's not worth risking too much health at the moment. There's either too many players alive, or the odds are too balanced in terms of health and weapons. If they see an opportunity, they can quickly go aggressive.

-Defensive
Description: The bot will keep their distance from the danger/enemy. They'll run away and try to slow down a dangerous enemy who might be chasing them, using throwables or throwing items at them.
Conditions: A player has a powerful weapon like bazooka/GL/M60, or a much superior melee weapon (example: axe vs. hammer) and the bot has a chance to run for cover and keep the distance. If there is no such chance, they will go completely aggressive towards that player.

Now, speaking of decision-making, I thought about some common mistakes players make, things that an intelligent bot should avoid doing.

Common mistakes/bad decisions:

-Trying to reach high ground, or jumping over a pit where there's a player defending it. The player can easily kick you/throw you off the pit. (Anakin mistake)
-Trying to equip a gun at melee range, or kneeling with an equipped weapon, getting disarmed.
-Wasting all the stamina when not necessary.
-Blocking when slighly below a player. In this case, spam attacks or grab. Punch the legs!
-Punching when slighly above a player. Kick him away instead, because your punches will go right above his head.
-Wasting all the ammo of one weapon when you have 2 weapons of different types (for example sniper+uzi/mag+smg). Start with the strong weapon, then save some bullets and switch to the automatic. After a while you can switch back to the power gun, saving some of the automatic gun ammo in case you need to finish off a player with low health.
-Melee fighting when there's too many players alive and you don't have a nice melee weapon advantage. In this case it's best to search for items and play passively.
-Melee fighting when a player with flamethrower/grenades/molotov approaches. Melee wastes stamina and those weapons do massive damage in area, so you should disengage.
-Cooking a grenade or molotov is a terrible idea if someone can fire at you with an automatic weapon. There's a big chance they'll blow up in your face.
-"Overextending" the fight after dealing burst damage (a lot of damage in very short time). You should back away, recover stamina, reload, reset your cooldowns (cooldowns for dive, rolling, grab, etc), then engage again. Example: I hit an enemy with a sniper, he falls right next to me. I sheathe the sniper, punch him once and grab him. I punch him away from me, and re-equip the sniper safely, ready to fire again.

Extra tips:
-if it's not too much waste of ammo, shoot item boxes to know what's inside from a distance.
-don't repeat patterns in melee. Try to vary, and sometimes even adding pauses between punches can confuse the enemy.
-if you're close to a player with a power weapon like magnum or sniper, you can't take safe cover and you have a melee weapon with big range such as bat/baton/katana/chain/axe, you should pressure them and try to force them to sheathe their gun.
-if you have a huge advantage against a low-health enemy, don't waste any time. They might pick up health or something like a bazooka if you take too long to finish the match.

This is what I can share from my experience as a player, I might remember some other tips, and if you guys wanna help too, comment here with your own strategy tips! I trust that Gurt can make awesome A.I. from what we've already seen in the original Superfighters.

Re: A.I. Discussion Thread

Posted: Thu Nov 17, 2016 9:07 pm
by Billy
It whould be great if we could manipulate AIs in the map editor using a window looking like that:



Agressivity
-------------------|-----------


Melee skill
-------|-----------------------


Aim
------------------------------|



And so on

Re: A.I. Discussion Thread

Posted: Thu Nov 17, 2016 9:28 pm
by M_M_M
I'm just more curious on how they plan on setting up pathfinding for bots. I've seen some designs that work well for players but I think bots would struggle on with an automatically generated navmesh, so I hope they plan on adding some sort of node marker for map makers to aid in a more fluent path generation.

Re: A.I. Discussion Thread

Posted: Fri Nov 18, 2016 6:41 am
by Pricey
Billy wrote:It whould be great if we could manipulate AIs in the map editor using a window looking like that:



Agressivity
-------------------|-----------


Melee skill
-------|-----------------------


Aim
------------------------------|



And so on
I think it would be a bit too difficult to configure the bots in such a fashion that they would have to make countless amounts of code to configure the bots to all of the possible combinations of difficulty. In my opinion, an "Easy", "Medium" and "Hard" setup like in SF would suffice.

Re: A.I. Discussion Thread

Posted: Fri Nov 18, 2016 7:48 am
by Motto73
The navmesh generating is very hard for real game-maker pros too. I think that they will let us crate the navmesh with some amrkers, like "WaitForElevatorZone" and "JumpZone" or "DangerZone" etc...

Re: A.I. Discussion Thread

Posted: Fri Nov 18, 2016 12:22 pm
by gwendalaze
Gathering real player's input could also be a possiblity, since SFD is a game with a very diverse gameplay. Bots wouldn't need to be clever, they just need to act as a player, even a retarded one.