In this section, we will be creating two base classes and our fuzzy decision maker:
- First, we'll create the MembershipFunction parent class, as shown in the following screenshot:
using UnityEngine; using System.Collections; public class MembershipFunction : MonoBehaviour { public int stateId; public virtual float GetDOM(object input) { return 0f; } }
- Next, we'll implement the FuzzyRule class, as follows:
using System.Collections; using System.Collections.Generic; public class FuzzyRule { public List<int> stateIds; public int conclusionStateId; }
- Then we're going to create the FuzzyDecisionMaker class, as shown in the following code:
using UnityEngine; using System.Collections; using System.Collections.Generic; public ...