Product Chat / The next Ai generation, --- lets talk about it.

Author
Message
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 27th Mar 2018 20:31 Edited at: 27th Mar 2018 20:33
Quote: " I give you a tipp, how to get a good AI:
Make a list what the AI needs as detailed as possible like:
see player -> Ai shoot (condition leads to action)(separate Zombies and Soldiers)
Then make a thread and let it discuss what other think they need from the AI.
Then the devs finally have a starting point where the problems are and can work on it"

As suggested by Corno_1

So lets not complain.
each user make two lists , one list of the problems you experience at this time of the Ai
and a second list of extra things you would like to see being implemented in the Ai script.

just maybe we could end up with a good working Ai, with good script and animation
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
Bugsy
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location: Savannah
Posted: 27th Mar 2018 22:11
problems I have:

collision- complete crapshoot. they sometimes can navigate interiors and stairs, but most often they either stand completely still and wait about 3 seconds before they appear to even notice the player, often halfway through the ground. sometimes they randomly float in the air.

navigation- often they will just turn and run into walls, or not understand when the player is above them and run into the wall he is standing on. It also seems that enemies are much more competent navigating EBE structures and terrain than custom modelled geometry. and I believe this is due partially to the way we handle navigation zones (more later)

lack of use of 99% of the animations that come stock with GG- FPSC had guys who could strafe and move while shooting. It's about time we got flinching (thanks lee) but it's high time we got the AI to at least the same level of ability that it had in FPSC

lack of control- There is one AI script for soldiers, you cant change their weapons, you can't respawn them when dead, and waypoints basically don't work at all on anything but the ground. I think that AI control should be improved with MESH ZONES for navigation that can be scaled and rotated like entities, as well as waypoints that function the same way (perhaps like lights)
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 28th Mar 2018 10:48 Edited at: 28th Mar 2018 21:52
They shoot through walls.
They get stuck in/against walls.
Sometimes they don't see the player right in front of them.
It is easy to lose them by running a short distance and going into a building.
Often the player can walk up behind them and actually barge into them without them doing anything. Sometimes the player can shoot a weapon near them and they just stand there.
Sometimes they walk on the spot especially if they get snagged on an object.

In short, would like them to act natural and not act so stupid. Also, play fair by not shooting through (EBE) walls.
Julian - increasingly disillusioned and jaded
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 28th Mar 2018 12:31
I've just had a quick paly at Get To The River. An enemy got stuck on a ladder (not climbing, of course) and was walking on the spot. I tried to take a screenshot but the screenshot feature doesn't seem to be working. So to translate into a requirement: Characters can navigate around objects and structures without getting snagged. I will add more when I have time.
Julian - increasingly disillusioned and jaded
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 28th Mar 2018 12:38 Edited at: 28th Mar 2018 12:43
I'd like to see a lot of changes with AI in GameGuru, at the moment it is extremely basic, although a lot of it is apparently down to scripting, and with the right script could be much better.

The way i would expect a soldier AI using a ranged weapon to act would on a most basic level be as follows:

Stage 1: This would be the peaced stage, when it's not attacking or responding to attack: At this point the idle would be a neutral pose, with the weapon not being aimed, the walk would be a casual walk with the weapon not being aimed, and it would follow patrol points. I would also like to see a new floor zone called a random patrol zone, in which the soldier will randomly walk around, with periods idling and periods walking.

Stage 2: This would be a stage between peace and aggression, when you are just out of range, we'll call it the alerted stage: At this point the soldier thinks he sees something and is responding by turning in your direction and playing some kind of "looking" animation", once you get close it will trigger stage 3

Stage 3: The aggression stage: At his point the soldier has seen you and will begin his attack, he will walk or run with an aimed weapon towards you, at a certain range he will stop walking and crouch and fire, or stand on fire, depending on if there are cover entities nearby. If you begin to close the gap below a certain distance he will begin to walk backwards while firing, once you get below an even smaller range he will stop backing off and switch to melee attacks.

Stage 4: The return stage: This stage is triggered either by the players death, or by the player running far enough away and/or behind cover that is a certain distance from the soldier, the soldier will stop, return to a peaced state and play the looking animation for a few seconds, then will turn around and walk back to it's original position and return to stage 1.

Obviously this would require extra animation slots configured in the scripts for each state, however, the good thing is, the basic soldier animations have all of these animations already built in, they just need to be scripted to use them properly.

This to me is how soldier AI should act at the most basic level, what we have is well below the basic level in my opinion.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Bugsy
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location: Savannah
Posted: 28th Mar 2018 13:10
i strongly think navigation zones becoming invisible-wall like mesh entities and normaling them to surfaces should be high on the list too.

I'd also like to see them aim upwards and downwards.
Defy
17
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 28th Mar 2018 17:19 Edited at: 6th Apr 2018 04:42
Love these type of threads, nothing really to add yet. I'm currently working on why an npc faces walls, I know the cause, though being able to make it look good.. well.. I plan to show in my AI thread why it happens sometimes. The factor I think it is, may not be an overall fix. tba.

@Belidos, Awesome idea about walking backwards and shooting. I wonder...
Define R4, i5, 16g, R9 290
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 28th Mar 2018 17:36
That looks great Defy, would love that script to be the default one, so far it looks so much better.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 28th Mar 2018 21:57 Edited at: 29th Mar 2018 00:18
I like all the suggestions put forward and of course I would like to see them implemented. But I think it would be a good start if what they are scripted to do right now actually worked properly.

Longer term (and I mean only once the basic stuff is well established), I'd like to see them react to being injured (not just temporarily recoiling but maybe by being permanently impaired). Way back in Goldeneye, characters clutched the injured area so maybe that too. I'd like to see soldiers dragging injured comrades to cover as well as getting themselves to cover. This might seem outlandish but you did ask and I've seen this kind of stuff in other games.

NPCs jumping, rolling, climbing and swimming, abseiling. NPCs sneaking or flanking. Maybe even sometimes falling or jumping from too high and getting injured.

NPCs running out of ammo and either reloading, obtaining more ammo, obtaining a different weapon or retreating.

Some kind of team work between soldiers would be good. A lone enemy might react differently from one in a team.

Each instance of an NPC having a comprehensive AI dialogue box so it can be made unique.

The use of the random command in the Lua script might make things more interesting. I think the characters need to be somewhat predictable (and that is very important) but not too much.

NPCs can pick up weapons. And throw grenades back before they explode.

The character AI could adapt in response to the player's own style and strategies. And how skilled or advanced the player is.

If the player seems to be getting the upper hand, maybe the enemy could get desperate, take more risks, make mistakes or get more aggressive or call in reinforcements (maybe even an airstrike), or just change tactics.

NPCs laying down suppressive fire.

NPCs' tactics change according to what weapon the player is using.

NPCs act like they don't want to get killed, retreating or seeking cover if necessary.

NPCs reacting to events that could hurt either them or the player: One of their own grenades landing nearby; a falling structure; a dangerous animal; fire; or any other hazard.

NPCs acting to protect or support injured or compromised comrades.

NPCs acting to accomplish their own mission which might not necessarily just be to kill the player.

Don't forget friendly NPCs and neutrals. Neutrals could get in the way. Friendlies could help the player.

I will get criticised for being too ambitious and plain ridiculous, but Lee Bamber did say he wanted to create the ultimate game engine... so there you go!

BTW, I notice AI is currently at the top of the feature voting list. Is the list being observed?
Julian - increasingly disillusioned and jaded
PM
Bugsy
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location: Savannah
Posted: 29th Mar 2018 07:28
i've wanted for a while to work with a scripter custom animating some TF341 characters to have ""better"" AI/animations/ be way smaller files so more can be used. I tried to get my own working for a while but .x exports dont like link constraints so that screwed that up completely.

nice one defy kudos
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 29th Mar 2018 08:49
Quote: "BTW, I notice AI is currently at the top of the feature voting list. Is the list being observed?"


The voting board is only active between when Lee announces a reset, and when the top voted selection is confirmed as work started. In between it means nothing. So basically once DX11 is officially released or close to release Lee will announce a vote reset, then we can cast our votes, so ignore anything that's at the top right now.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Avenging Eagle
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 30th Mar 2018 10:33
I agree, the current AI system is awfully inconsistent and limited; it's like a delicate Jenga stack of interlocking LUA scripts that is difficult to understand and customise - making even the slightest changes has the potential to topple the stack. I understand the principle of doing it that way, but I think it needs to be a lot more modular to allow customisation. You know what I'd like to see? AI behaviour trees.


(This, I believe, was taken in the Unreal 4 engine)

Imagine opening an entity's properties and having the option to assemble its behaviour right there in the editor. You could create condition nodes where you could have a list of pre-programmed conditions like if_player_seen or if_entity_health_less than and some fields for variables like viewdistance = ????. Then you could create action nodes from where you could select actions including Move_To_Player, perhaps even chain actions together within the same node, for example Play_animation + Play_sound: filename + do_damage: 10

The optimistic part of me would like to believe this wouldn't be too difficult to implement. After all, it's basically just a graphical interface for if then commands. The realistic/pessimistic side knows that this is unlikely to be tackled by Lee himself any time soon, so it might be up to the modders to do something about it.

AE
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 30th Mar 2018 17:56
I would love to see an interface like this implemented.
Julian - increasingly disillusioned and jaded
PM
Defy
17
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 1st Apr 2018 07:44
@ bugsy . Thanks skipper. Fan of your work also.
when the system I'm working on is fully operational I will let u know.

@avenging eagle, wow long time. Hope all is well. Loved a cutscene of yours I watched recently.
Very talented at those. And yes I do also agree with tree structure. Hmm. All the best

@lordjulian , happy to see your issue is starting to work out. Happy for you. If I find anything else on my path. I will pm you.


Question, how do people feel about knock back and stunned for 1-2secs if combat hit/melee'd ?
No player control, though can shoot or no shoot? Or ditch this idea?
Define R4, i5, 16g, R9 290
PM
Nomad Soul
GameGuru Tool Maker
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 2nd Apr 2018 11:46 Edited at: 2nd Apr 2018 11:49
Yeah so I did the FPSC AI reboot for Black Ice Mod and it uses some of these principles.

Basically I found stripping the AI right back gave a much more reliable and fun gameplay than some of the larger more complex scripts. I also chose not to use Dark AI as that has its own problems and unpredictable (not in a good way). It was really just a base and I'll probably incorporate more states / animations in the future.

Defy
17
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 2nd Apr 2018 12:34
Yes, Miss the strafe. Nice work as always. Hope the Mod is going well.
Define R4, i5, 16g, R9 290
PM
Bugsy
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location: Savannah
Posted: 2nd Apr 2018 19:03 Edited at: 2nd Apr 2018 19:03
I like this video's AI nomad, but one thing i always notice about "AI tests" is it involves like one or two bots and a player who lives pretty much forever so that just about everything the player can do, he can demonstrate without dying too much. I feel like this doesn't effectively showcase what AI is capable of in a "game situation"

it goes a LONG way to show that the AI here is really smart, but I think less focus needs to be on how "smart" our AI is, and more should be on the fact that our characters can use at least a decent number of their animations, and can navigate around, up, and down slopes and stairs.

they don't necessarily need to dive in cover and flip tables over, but if we kept the flinching we already have, but just added strafing, fixed the nav/collision and revamped the waypoint system, I think GG's current AI would go a long way.

in kshatriya challenges in FPSC, I was able to use non-character dynamic entities for civilians for setpieces sake with NO COST TO FPS, coupled with very simple enemies who used a slightly modified follow.fpi so they'd leave their spawnrooms, then strafe.fpi as their shoot script so it would seem like they kept popping out from behind walls. I also respawned them when dead once or twice each to keep the fight going for a second. heres the example

lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 3rd Apr 2018 10:39
Thanks, Defy.
I think the 2 second stun could be interesting. But it might make it too easy to kill the character. I think this is by Lee disabled the reload animation.
Julian - increasingly disillusioned and jaded
PM
Defy
17
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 3rd Apr 2018 14:22 Edited at: 6th Apr 2018 04:43
Yeah I love watching these videos, both awesome work.

@lordjulian, Hey, thanks for your suggestion.

@Bugsy I agree to your above comment, and your key three I agree on also. Noted. [ic:coffee

@Any Model Makers available, that can do segment/block style models? Would love to chat, will be something for the community. PM, Thank you.
Define R4, i5, 16g, R9 290
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 3rd Apr 2018 14:43
Shoot me a message, i'm actually working on a set of grid snapping modular walls, floors, ceilings, etc. If it's similar to what you want i can see about putting together a basic set for you.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Defy
17
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 3rd Apr 2018 15:07
Awesome, thank you. Sent PM. Only after one, though Grid is similar to what is required for one last test.
Define R4, i5, 16g, R9 290
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 3rd Apr 2018 21:17
Here you go, this should fit one ebe square

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.

Attachments

Login to view attachments
Bugsy
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location: Savannah
Posted: 4th Apr 2018 03:30
nice! I love how they use SO many more animations!!! i'll also model or at least try to animate anything you'd like as well. I'd love to see how these soldiers do in combat, with sounds thrown in! I'm glad to see them walking up stairs, but are those entity stairs or EBE stairs?

another question, were those soldiers set to not shoot the player?
Defy
17
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 4th Apr 2018 04:16 Edited at: 4th Apr 2018 11:40
@Bugsy, Thank you also for the offer. I'm sure once everything is ironed out I will start looking into that. I took a night off to check stairs. EBE stairs have an issue as many are aware of. The good news is, it's about 75% there. Will run tests tonight and hope to get working to some extent for now until I get another operational option inside EBE. *The view range was set to 200, this was more about me watching than fighting, so I recorded some.

@Belidos , we're almost there. Sent you a PM.

@PCS, sorry to go off topic'ish.

I will let everyone continue, this is an interesting thread. Yes, some are dreams, though its still great to hear peoples thoughts.
Define R4, i5, 16g, R9 290
PM
Bolt Action Gaming
GameGuru Tool Maker
11
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 4th Apr 2018 17:08
I have a fair amount of experience in my past with working on AI, specifically for Quake-C back in the late 90's and early 2000's so I'm going to throw my 2c (or 2p, if you're a brit) at the screen here.

I see a LOT of problems with the current implementation of AI in Game-Guru and would advocate a complete re-write. There's several major contingencies that are killing it as far as I can see.

1) the hitbox/collision detection is a serious issue. There's way too much faulty interfacing and I'm not entirely sure why as I've only taken cursory swipes at the code. This is very clearly a problem though. The box around the AI is generally too poorly interpreted and causes it to either not recognize walls or allow elements of the mesh to push through

2) There's not enough error checking in the code, causing weirdness like shooting through walls and what not.

3) Once the AI is active, it stays active, eating a massive amount of CPU

4) There's no way to idle the AI or aggregate it's function with other AI to minimize CPU hits

5) Raycasting is... odd. I don't know why, but it seems like it never quite works how I think it will.


Good elements about Game-Guru that are not used fully: the node system. I've got a LOT of work in my book here that I can't divulge directly (yay contracts) but I can make vague statements

... the node system is your friend. If you want your AI to function BETTER (maybe not flawless, but better) learn to use the node system. It is a lifesaver.

Extra functions (candy) for the AI are not necessary at this point and will only further complicate code that needs a lot more modularization and cleanup. I would take this tract (which I intend to, eventually) with the AI code:

1) Break down things that work and things that don't.
2) Rewrite all code as functions and modules.
3) Have the primary state loop operate off said functions and modules in a way that is small and simple.
4) Fix all error checks, work on optimizing the code's function in core mechanics:
- states
- functions (shooting, checks, movement, etc)
- optimizing utilization by putting in state idles and giving the CPU back some love, optimizing for faster code and processing by minimizing redundant
and unnecessary calls (like ray tracing a dozen times in a second for one hit detection after a hit was already done, stuff like that).
5) start building additional utility functions such as group aggregation via centroid computation, better node pathing, group logic by sharing target data, building a linked list of friends and a hash table to fast compute targeting info.
6) add more candy like additional stuff - strafing, fuzzy logic trees for better response in combat, etc.

Just my thoughts. I was planning on using my weather system's state change setup as a foundation for it. I'll get there one day LOL

Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 4th Apr 2018 17:37
Quote: "... the node system is your friend"


What node system?

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 4th Apr 2018 23:05
@Defy. no problem,, i just like to read all about what anyone has to say about the Ai and any thing or anyway to get it better , so don't worry to get off the topic. if this tread can lead to a better Ai with script and animation , so what if we get of the topic.
thanks for every one who try and get the Ai better.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 4th Apr 2018 23:07
@Bolt Action Gaming, love your idea's
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
Bolt Action Gaming
GameGuru Tool Maker
11
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 6th Apr 2018 16:28
@Belidos

Specifically the waypoint navigation system is a node based pathing system.
It works exceptionally well. I mean that. Whatever work Lee did here is worth it's weight in gold.
I'll give you an example.
I created a minigame for my wife this last Christmas. It was effectively a Game-Guru five nights at freddies simulator. I'll bundle it up and release it so people can see it, if I can manage the time tonight.

Anyways, how it relates: I created a few hacks to the AI which allowed me to make several different versions of the stock melee AI that would stop moving when you shined a flashlight on them or if you are looking at them. I ran into some issues though when we got out to the 'pizza parlour' floor with all the chairs and tables. The AI kept getting snagged on them or didn't know how to navigate them at all. So I added a ton of waypoints throughout as a sort of a mesh and they navigated it beautifully. The game is actually quite challenging as a result. I mean they can still get hung up on things but I was able to get a very effective form of interior navigation that was extremely difficult to do procedurally without nodes.

There were nine tables in a square room with 3-4 chairs per table. I'll post some pictures tonight.

So let me back up a step. Typically with AI there are two different 'pathing' mechanisms. The first is a sort of organic method that uses fuzzy logic, raytracing, and object checks to sort of build an awareness of the room. This method requires a lot of code to make it work right. This is the part of the Game-Guru AI that is in need of some desperate help.

There's also another form of pathing called node-based pathing. This is where the waypoints come into play. When you place a waypoint it helps form a navigation mesh that gives the AI a clear 'this place is safe to go to from your current location' message. It helps you create a semi-automatic method of movement which gives you greater control of the AI's chosen 'walking paths'.

For example:



So .. that's it in a nutshell.
If more people used the nodes, floor zones, cover zones, etc the way they're MEANT to be used, the AI would work a lot better for them.

Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 6th Apr 2018 16:48
Quote: "Specifically the waypoint navigation system is a node based pathing system."


Ah i was having a brain fart, i was thinking along the lines of a node system as in cycles rendering in blender, or the blueprints system in unreal etc.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.

Login to post a reply

Server time is: 2024-11-16 18:30:46
Your offset time is: 2024-11-16 18:30:46