-
Notifications
You must be signed in to change notification settings - Fork 3
ThinkEngine 2.1
ThinkEngine is a Unity asset that allows to integrate automated reasoning modules in a videogame or whatever other kind of software developed in Unity. ThinkEngine has been developed having the integration of declarative ASP modules in mind, but other types of automated reasoning can be wired (e.g., PDDL), with an effort which we are constantly working at making as light as possible.
- Check out our game showcase
- Video demo of Tower Defence
Download and extract the file ThinkEnginePlugin.zip in the root folder of your Unity project (the one containing the Assets, Library, Packages, etc... folders).
Make sure that the dlv2 binary in the "Assets/StreamingAssets/ThinkEngineer/ThinkEngine/lib" folder has executability access rights.
The only scripting features you need to know about regard the ThinkEngineTrigger and the Action scripts. You can read about their usage at the relative sections: Programming custom triggers and Action (for Planner Brain only).
- ThinkEngine works by wiring Brains to the game scene. There are two types of brains: Reactive brains and Planning brains;
- Reactive brains work by wiring them to Sensors and Actuators;
- How to wire Sensors: just add a Sensor Configuration script to a GameObject (or a Prefab) of choice; customize the Sensor Configuration by selecting which properties of the game object at hand need to be mapped to a sensor;
- How to wire Actuators: just add an Actuator Configuration script to a GameObject (or a Prefab) of choice, and configure it by selecting which properties of the game object at hand need to be mapped to an actuator; one can also enforce a postcondition telling whether the action at hand must be executed (see below).
- How to wire a Brain: select a GameObject or Prefab and add a Brain script (either Planner or Reactive);
- You can now select in the Brain properties as many SensorConfiguration(s) and ActuatorConfiguration(s) (only for Reactive Brains) as you like;
- If needed, one can generate the template of logical assertions showing how input sensors values and actions values are represented in a Brain;
- The brain script will show you a predefined path in which to save one or more .asp files. .asp file declaratively specify the decision making logic of the brain at hand. All the .asp files matching the pattern in the ASP Files Pattern field will be executed together when a reasoning task is triggered;
- In the Choose when to run the reasoner combo box, one can specify when a Brain activates, i.e. when reasoning is triggered (see below on how to program custom triggers).
You can give a look to the configuration demo available here. (for Reactive brains only)
A configuration demo for Planner Brains will be added soon.
Note: Prefabs should be placed in some folder located in "Assets/Resources/Prefabs". If you want to check the run-time generated ASP facts files, check the box Maintain fact file in the Brain component and access the "ThinkEngineFacts" in your "Temp" system folder by clicking the button Open Input Folder.
The ThinkEngine generates a C# script, named "Trigger", in the folder "Assets/ThinkEngineer/ThinkEngine/Scripts" (you can then move the script wherever you want). You can add to this script as many boolean functions (with no parameters) as you want. When configuring Actuators and Brains you will be provided with a drop-down list in which all those functions are listed: you can choose one of these as "reasoning task trigger" (for triggering brains' reasoning tasks) and "apply actuator trigger" (for triggering the actuators). Note that there is always a default trigger event: "When sensors are ready" for brains and "Always" for actuators.
You can find a detailed documentation and a video tutorial here.
If you want to mention the latest ThinkEngine:






Earlier ThinkEngine version (older mapping scheme, no planning, many less features) was reported in:


Core:
- Giovambattista Ianni (Project coordinator, tweaking and fiddling)
- Denise Angilica (Chief Code Maintainer)
- Francesco Pacenza (Code and game development, ASP integration)
Developers:
*Giorgio Michele De Giorgio (sensors' reflection at design time - optimization)
Past and present student collaborators:
- Fabio Barrese (Code development, porting to macOS, showcase games development and upgrade)
- Antonio Pantaleone Carito (Frogger showcase game)
- Salvatore Laiso (benchmarking engine)
- Giuseppe Beltrano (showcase game development)
- Emmanuel Scarriglia (early version of the testing engine)
- Alessio Farfaglia (game development, testing and bugfixing)
Feel free to reach us at thinkengine @ unical.it