fr.lifl.jedi.model.interactionSelection.reactiveSelection
Class InteractionSelectionPolicy

java.lang.Object
  extended by fr.lifl.jedi.model.interactionSelection.reactiveSelection.InteractionSelectionPolicy
Direct Known Subclasses:
FirstInteractionThenTargetSelectionPolicy, FirstTargetThenInteractionSelectionPolicy, TupleSelectionPolicy

public abstract class InteractionSelectionPolicy
extends java.lang.Object

This class represents a part of an agents behavior.

The interaction selection process uses a subsumption-like architecture to select what the agent performs. Every assignation element involved in the action selection process is given a priority, with the methods InteractionMatrixLine.add(fr.lifl.jedi.model.interactionDeclaration.DegenerateInteraction, int), InteractionMatrixLine.add(fr.lifl.jedi.model.interactionDeclaration.MultipleTargetInteraction, Class, double, int) or InteractionMatrixLine.add(fr.lifl.jedi.model.interactionDeclaration.SingleTargetInteraction, Class, double, int). Interaction selection takes place in decreasing value of priority, and checks every priority until a realizable tuple is selected.

For each priority, a particular interaction selection policy is used to select the initiated realizable interaction. This policy is defined thanks to an instance of this class and its subclasses.

An interaction selection selection policy is separated in two parts :

  1. The first one defines on which elements this policy takes place. Indeed, the selection can be made either by :
  2. The second part defines the nature of the selection of tuples, interaction or target. Natures can be :
    1. a random selection of an element (see RandomSelectionNature);
    2. a preferred selection of an element (see PreferredSelectionNature)
    3. a weighted selection of an element (see WeightedSelectionNature)

For instance :

Version:
JEDI V 2.2
Created the 6th nov. 2008
Modified the 4th may 2009
Author:
Yoann Kubera
SMAC Team (Systèmes Multi-Agents et Comportement)
LIFL (Laboratoire d'Informatique Fondamentale de Lille)
University of Lille, France

Field Summary
static InteractionSelectionPolicy DEFAULT_POLICY
          The default interaction selection policy used by agents.
 
Constructor Summary
InteractionSelectionPolicy()
           
 
Method Summary
abstract  InteractionSelectionPolicy clone()
           
abstract  AbstractRealizableTuple<?> performSelection(java.util.List<AbstractRealizableTuple<?>> affordances)
          Asks the policy to perform a selection among the realizable tuples list provided in parameter.
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_POLICY

public static final InteractionSelectionPolicy DEFAULT_POLICY
The default interaction selection policy used by agents.

This policy selects tuples at random.

Constructor Detail

InteractionSelectionPolicy

public InteractionSelectionPolicy()
Method Detail

performSelection

public abstract AbstractRealizableTuple<?> performSelection(java.util.List<AbstractRealizableTuple<?>> affordances)
Asks the policy to perform a selection among the realizable tuples list provided in parameter.

Parameters:
affordances - The realizable tuples list among which selection is made.
Returns:
The tuple selected in the list of realizable tuples.

Returns null if no tuple was selected.


clone

public abstract InteractionSelectionPolicy clone()
Overrides:
clone in class java.lang.Object
See Also:
Object.clone()

toString

public abstract java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()