public void Awake() { brain = new iThinkBrain(); // Sensing GameObjects List<String> tags = new List<String>(); tags.Add( "block" ); brain.sensorySystem.OmniscientUpdate( this.gameObject, tags ); // Building knowledge initKnowledge(); brain.curState = brain.startState; // Generate actions from knowledge brain.ActionManager = new iThinkActionManager(); brain.ActionManager.initActionList( this.gameObject, schemaList, brain.getKnownObjects(), brain.getKnownFacts() ); // Init search renderCurrentState(); brain.planner.forwardSearch( brain.startState, brain.goalState, brain.ActionManager ); }
//initialize brain, state and goal public void brainInit() { brain = new iThinkBrain(); //find all game objects by tags tags = new List <string>(); tags.Add("forest"); tags.Add("mine"); tags.Add("factory"); //tags.Add("warehouse"); //tags.Add("windmill"); tags.Add("lumberjack"); tags.Add("magicTower"); tags.Add("object"); tags.Add("animal"); tags.Add("resource"); tags.Add("weapon"); tags.Add("tool"); tags.Add("laboratory"); tags.Add("armory"); tags.Add("market"); tags.Add("lake"); tags.Add("fishingPole"); //tags.Add("townhall"); tags.Add("temple"); tags.Add("barracks"); tags.Add("district"); tags.Add("repository"); //tags.Add("slaughterhouse"); brain.sensorySystem.OmniscientUpdate(this.gameObject, tags); brain.startState = new iThinkState("Initial", new List <iThinkFact>()); brain.goalState = new iThinkState("Goal", new List <iThinkFact>()); initKnowledge(); initGoal(); brain.curState = new iThinkState(brain.startState); brain.ActionManager = new iThinkActionManager(); brain.ActionManager.initActionList(this.gameObject, actionSchemas, brain.getKnownObjects(), brain.getKnownFacts()); }
//update action manager, when new objects enter the domain or other ones are removed from it public void updateActionManagers() { brain.ActionManager = new iThinkActionManager(); brain.ActionManager.initActionList(this.gameObject, actionSchemas, brain.getKnownObjects(), brain.getKnownFacts()); //printActions(); }
//initialize brain, state and goal public void brainInit() { brain = new iThinkBrain(); //find all game objects by tags tags = new List<string>(); tags.Add("forest"); tags.Add("mine"); tags.Add("factory"); //tags.Add("warehouse"); //tags.Add("windmill"); tags.Add("lumberjack"); tags.Add("magicTower"); tags.Add("object"); tags.Add("animal"); tags.Add("resource"); tags.Add("weapon"); tags.Add("tool"); tags.Add("laboratory"); tags.Add("armory"); tags.Add("market"); tags.Add("lake"); tags.Add("fishingPole"); //tags.Add("townhall"); tags.Add("temple"); tags.Add("barracks"); tags.Add("district"); tags.Add("repository"); //tags.Add("slaughterhouse"); brain.sensorySystem.OmniscientUpdate( this.gameObject, tags ); brain.startState = new iThinkState("Initial", new List<iThinkFact>()); brain.goalState = new iThinkState("Goal", new List<iThinkFact>()); initKnowledge(); initGoal(); brain.curState = new iThinkState(brain.startState); brain.ActionManager = new iThinkActionManager(); brain.ActionManager.initActionList( this.gameObject, actionSchemas, brain.getKnownObjects(), brain.getKnownFacts() ); }
public void Awake() { brain = new iThinkBrain(); // Sensing GameObjects List <String> tags = new List <String>(); tags.Add("block"); brain.sensorySystem.OmniscientUpdate(this.gameObject, tags); // Building knowledge initKnowledge(); brain.curState = brain.startState; // Generate actions from knowledge brain.ActionManager = new iThinkActionManager(); brain.ActionManager.initActionList(this.gameObject, schemaList, brain.getKnownObjects(), brain.getKnownFacts()); // Init search renderCurrentState(); brain.planner.forwardSearch(brain.startState, brain.goalState, brain.ActionManager); }