Writing game code, in general, is difficult. While there are plenty of assets in the Unity and Unreal asset store to ease a lot of the burden, being

an unheard of solo Indie Dev with student loans means disposable income is rare luxury. This means every asset I use is either Open Source or something that I have made myself. While there are a lot of nice 3D models and animations, available online, good code is hard to find. Most of the code assets starts as Open Source and either they die due lack of interest or they get pull down and made into paid assets. Over the last few years, I have tried to find and make an AI system for my hack and slash project with little to no success.
My first attempt at AI was using a Finite State Machine, FSM. While FSM are good for simple AI Systems, they start to get a bit cumbersome for large system with multiple states. FSMs are great because they are so simple and intuitive. When they get big, however, they become so complicated. It got to a point where I am afraid to change the configuration of the FSM because the working AI easily breaks. From there, I move to Behavior Trees. I have used a number of free open source assets. Unfortunately, not of them have functioned quite the ways I liked. In addition, behavior trees are not necessarily any better, either. They also have a major disadvantage: steep learning curve. You have to think like a compiler when working with BTs. You have to know what its elements mean like Sequence, Selector, Parallel, Decorator, etc.
After listening to GDC talk from 2010, I decide to try a Utility AI approach. Goal oriented action planning is an artificial intelligence system for agents that allows them to plan a sequence of actions to satisfy a particular goal. The particular sequence of actions depends not only on the goal but also on the current state of the world and the agent. This means that if the same goal is supplied for different agents or world states, you can get a completely different sequence of actions, which makes the AI more dynamic and realistic. For my usage, the GOAP fits perfectly.

For anyone who is trying to develop their own AI, I will release my code once I have completed, simplified, and optimized it for in game usage. For those of you unable to wait for that day, here is a look into how I developed the basis for my system. I started with a FSM system based on Chapter 3.1 of Game Programming Gems 1 by Eric Dybsand and written by Roberto Cezar Bianchini. That code can be found here. I replace all the code regarding the Transition with what I am calling EvaluationState. EvaluationState is an abstract class which contains the logic and scoring for determine what state to run. An EvaluationStates can be used on multiple states.
Please stay tuned for future update. There ae a lot of quality of life and performance changes include Unity ECS integration.