I. Agents and entities
The environment that agents interact with consists of controllable entities that can perform
actions in the environment.
An agent can control the actions of these entities and can see what they see through
percepts that agents receive and store in a data base(mental state).
It’s important to note that the agent and environment are seperate processes.
An agent has three core abilities that enable its interaction with the environment :
- Event processing (percepts and messages)
- Representing information (modelling the environment as a database)
- Decision making (reasoning and action selection)
Marble agents use a knowledge representation language for representing percepts, beliefs and
messages and prolog to represent state of elements in the environment.
II. Marble
MARBEL is a rule based langauge. These rules are in the form of a condition-action rule : i, e if
true then print(« hello worlds »).
- An agent consists of multiple files :
(.mas2g) file is used to lauch an agent system, connecting to the environment
process and for processing events.
- Knowledge representation is used as the intitial database (.pl)
- (. mod2g) files are used to program the decision making of an agent
- An agent consists of multiple modules, most important is the decision module.
, The launch command is called a launch rule. It tells the platform when to create and launch
agents.
II.1 updating the robot (robotUpdate.mod2g)
As you can see above, the robotUpdate file is responsible for updating the information agent
« robot » has access to, i.e update in which rooms the agent has been or remove block
if it’s not percieved.
- Keep in mind that the use clause indicates the agent’s database (.pl)
The code line :
Indicates that the exit module will be initiated after condition is reached
If exit is assigned always then the module is immediatley exited after exécution, i.e it’s executed
only once.
exit=noaction entails not exiting the module after exécution and only moving on when there’s
nothing left to do.