AI That Learns from mistakes
Is it possible to make a AI that learns from your mistakes and can set down traps, set up cameras. I cannot find a tut to make that kind of AI. Is it blueprint or c++? Thanks
asked Jun 10 '18 at 10:53 PM in Blueprint Scripting
Yes, It is very possible using workarounds. You can set up this "intelligent" ai by using simple "if" statements around player behaviour etc. For example, every time the player hides, save a vector with that location and the number of times he goes there if it is the same location. If the player hides there 3 times or more, make the AI go to that location to check it. Same deal with the windows/doors. Check how many times the player goes through that window/door (Use triggers/collision). The more the player goes through that window/door, the higher chance the AI will board it up. There is no single tutorial that will help you do this, but it is possible using multiple systems.
Let me know if this is helpful!
answered Jun 12 '18 at 10:03 AM
Yes, although it depends exactly what you want.
If you want it to 'truly' learn from it's mistakes and adapt dynamically then this will probably be a very complex system and you'll probably need to write most of it yourself (there may be some libraries you need to use). I certainly wouldn't suggest attempting this with blueprints, although it might be possible (but slow).
However, the alternate and usual "game" way of handling this is to look for specific triggers / patterns performed by the player and if they are seen, your Behaviour Tree can trigger some other action. For example, it could know if a character kept going down a certain passageway (by setting up collision triggers) and if that occurs a certain number of times, the behaviour tree might then instruct the AI to go and set a trap in that passageway,
This second way gives the illusion of learning, although it's really only adapting based on pre-programmed rules. Probably enough for most games and will probably give a more satisfying "game play" than any real AI learning system (at least for now). This will still be quite complex to create though and I recommend writing down everything you want it to achieve before you start implementing anything.
answered Jun 11 '18 at 08:54 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here