Marbel Flashcards
Agent
Anything that can be viewed as perceiving its environment through sensors and acting upon that environment through effectors
Controllable entities
Can perform actions in the environment (a bot, a gripper, a character)
Percepts (definition)
Received by agent and inform it about what the entity can see
Event processing
Enables the agent to process events, such as percepts and messages between agents
Representing information
Enables the agent to maintain a model of the environment and enables the agent to reason about its environment
Decision making
Enables the agent to reason about what it should do next and select an action to perform next
.mas2g file
Used for launching an agent system, connecting agents to entities in an environment, and for processing events by subscribing to channels
.pl file
A knowledge representation file used for representing information and to create the initial database of an agent
.mod2g file
Module files, contain rules that are used for programming the decision making capability of an agent
Launch rule
Launching an agent in marbel with command launch
Init module
The first module to be executed when the agent is launched
Update module
Update the agents database after performing an action
action rules
rules that consist of a query and an action
environment actions
change the state of the environment
single agent environment (property)
an environment with only a single entity that can make changes to the environment
use clause
use id.
where id is a prolog file, this enables MARBEL to use prolog
multi-agent environment (property)
an environment in which more than one agent can make changes and effect the environment
deterministic (property)
Effects of actions on the environment state are completely predictable
discrete(property)
There is only a limited number of percepts and actions available in the environment
fully observable (property)
an entity can always see the complete figuration of the environment
send always (percept)
New information that becomes available should be added whereas old information
should be removed.
replace handler
environment actions
actions made available by an environment
precondition
specifies whether its possible to perform an action (can be a query or not)
actions are enabled when
the preconditions for being able to perform the action hold
instantaneous action
the time needed to execute it can be neglected
durative action
the time needed to execute it can not be neglected, they take time
if another action is performed while the durative one is still in progress the durative one will be cancelled
send action
used for communicating messages to other agents
insert (<update>) action</update>
modifies an agents database by inserting all positive literals in <update> into it, and removing all facts that occur in negative literals in <update></update></update>
should be a conjunction of prolog literals
(insert (not(on(1,2)), on(1,0) removes on(1,2) and inserts on(1,0)
delete (<update>) action</update>
modifies an agents database by removing positive literals in <update> and adding negative literals</update>
+ operator
can be used to combine actions
executed from left to right
insert(…) + delete(…)
print(<term>) action</term>
prints the prolog term <term>, can be anything</term>
log(<parameter>) action</parameter>
can be used to write logging information to a file
sleep(<term>) action</term>
freezes the agent for <term> amount of time, after the agent will continue on as normal</term>
starttimer(<name>,<interval>,<duration>) action</duration></interval></name>
can be used to start a timer
canceltimer(<name>) action</name>
can be used to cancel a timer before its duration has ended
partially observable
an agent cannot see the entire figuration of the environment
static (property)
the environment doesnt change if the agent doesnt do anything
properties of environments
static/dynamic
discrete/continuous
single/multi agents
deterministic/stochastic
full/partial observability
send once (percept)
For percepts that are received only once,
add handler
send on change (percept)
received each time when an environment feature
changes but not received when the feature does not change.
update handler
if … then exit-module
terminate the agent when its done
linear order style (rule evaluation for decision making)
done in order (the first rule that is applicable is applied)
linear all style (rule evaluation for initialization and updating)
first, all rules are evaluated and then all rules that are applicable are applied
order option for a module
with this the order of rule evaluation can be changed (random, linear, linearall, linearrandom, linearallrandom,randomall)
agent-oriented programming
a model of decision making where agents make decisions based on what they believe
condition-action rules
an action is enabled based on a condition
if <condition> then <action></action></condition>
launch policy
tells the platform when to create and launch an agent
(launch helloWorldAgent.)
agent definition
specifies a name for the agent and consists of a definition section that specifies which module files should be used for creating the agent,
specifies a type of agent
(use helloWorld for decisions)
exit=noaction
terminate the agent when theres nothing left to do
with clause
used to set one or more initialization parameters of an environment
(with start=[2,3,0].)
flounder
a prolog program that applies negation to a non-ground literal
avoid this by making each variable in the body of a rule first appears in a positive literal (block(X) before not(on(_,X).)
non-ground literal
a literal that contains uninstantiated variables
closed world assumption
anything not explicitely stated to be true in the database is assumed to be false,
thus the database should contain all relevant facts about the environment for it to work correctly
a predicate is defined when
if it occurs in the head of a prolog rule
declaring predicates
all predicates that are used, but not defined need to be declared (in the dynamic section)
forall <query> do <action></action></query>
used to apply a specified action to all bindings that satisfy a given query
(forall on(L1, L2) do delete(on(L1,L2))