-
Notifications
You must be signed in to change notification settings - Fork 48
Creating Rule Generators
Raluca D. Gaina edited this page Feb 12, 2018
·
2 revisions
You can create a rule generator by creating a class called RuleGenerator
which inherits from core.generator.AbstractRuleGenerator
class. This class should implement two essential methods:
- public RuleGenerator(SLDescription sl, ElapsedCpuTimer time): This is the constructor of the rule generator.
- public String[][] generateRules(SLDescription sl, ElapsedCpuTimer time): This function is responsible returning the interaction rules and termination rules.
All functions are provided with the same two objects:
- Sprite Level Description (SLDescription) object: is a description object that provides the user with functions to retrieve information about the current level and the associated sprites. It provides the user with function to test rules and termination conditions. Follow this link for more information about SLDescription.
- Elapsed Cpu Timer (ElapsedCpuTimer) object: is a timer object that provides the amount allowed for this function.
The generateRules
function should return a 2 arrays of string. The first is an array of the interaction rules in the generated game. The second is an array of the termination conditions in the generated game.
The next pages shows sample of rule generators:
-
GVG Framework
- Tracks Description
- Code Structure
- Creating Controllers
- Creating Multi Player Controllers
- Creating Level Generators
- Running & Testing Level Generators
- Creating Rule Generators
- Running & Testing Rule Generators
-
Forward Model and State Observation
- Advancing and copying the state
- Advancing and copying the state (2 Player)
- Querying the state of the game
- Querying the state of the game (2 Player)
- Information about the state of the Avatar
- Information about the state of the Avatar (2 Player)
- Information about events happened in the game
- Information about other sprites in the game
- Game Description Class
- Constraints
- Game Analyzer Class
- Level Analyzer Class
- Sprite Level Description Class
- Sprite, Termination, and Interaction Data Class
- Level Mapping Class
- Competition Specifications
- VGDL Language