Create an AI system that learns and draws it own conclusions.

I am trying to create an artificial intelligence system that can draw it own conclusions and avoid events that have caused the character (NPC) damage before . Searched online and found the “Neural Network” and “Learning Reinforcement”
For example when the character jumps from a height the first time he gets hurt ,next time he will avoid jumping from that height.
Please any leads will be a great help ,even if it has not been implemented in UE5 . I am a programmer who is pretty new to unreal so i think i can figure it out from there . Thank you

First: To do this in the general case, is an active research problem. All the models that exist right now need hundreds, thousands, or even millions of examples to “learn” from.

Second: In the special case of a game actor, you can cheat, as long as you know “cause” and “effect.” For example, you can already know that “certain floor tiles will hurt me,” but you start out with an empty list of which tiles are bad, and then when a tile hurts you, you “fill in the blank” in that knowledge “hole” so that the actor can make a better decision.

You can even expand this to sequences of actions – for each internal action/command the actor takes, store them in a queue of whatever they did in the last 5 seconds or so; then when the actor takes damage, add a small penalty to each command that’s in the recent queue. When the actor gains something (health, score, hits the player, or whatever,) then add a small reward to that kind of action. You might also want to separate actions by location – “jumping in this location” is different from “jumping in that location.” When time comes to pick a new action, use the score/penalty/reward prediction you’ve accumulated to influence the decision.

So, for gameplay, a predictable system that “knows” what kinds of things can matter, will absolutely be most robust. Trying to apply large recurrent learning models to the problem, is unlikely to work well unless you have a lot of time, understand the math and statistics behind the models, and have a good way of evaluating the behavior.

1 Like

thank you very much . will try the score/penalty/reward prediction you just mentioned.