


Fuzzy Combat Logic Sim is a program I made to learn and demonstrate Fuzzy Logic in action. Each entity is given health, stamina and experience, along with three logic stats;
Fear: Fear dictates when an Entity is too afraid to take actions. When afraid, Entities will roam around randomly until it wears off.
Discord: Discord dictates when an Entity is angry enough to start attacking another Entity with their Weapon.
Avarice: Avarice is a stat that governs greed and consumption. Entities with a high Avarice will store Energy in their inventory more frequently, and will also hunt for Weapons and Energy more often, even if they don’t need them.
Some actions use multiple attributes at once to determine what will happen, which is where Fuzzy Logic becomes truly interesting. The AI has a fair bit going on, and inside the program users can play around with creating entities, and read more about how it all works.
Most of the Fuzzy Logic works by checking the entity’s attributes against different ranges that are affected by the situation, current stats, proximity to others, inventory, and more. Each range results in a different action the entity might take, with the idea being the higher the value, the more likely the result.