LGames
Class HolisticDGame2

java.lang.Object
  |
  +--LGames.DGame
        |
        +--LGames.HolisticDGame2

public class HolisticDGame2
extends DGame

The class HolisticDGame2 implements the discrimination games for HolisticAgent2. I.e. for agents with a hierarchical layering of meanings.
The function playGame is used to control the game.

Copyright (c) 2004 Paul Vogt


Field Summary
protected  int iMeaning
           
protected  int maxMeanings
           
 
Constructor Summary
HolisticDGame2()
          Empty constructor
HolisticDGame2(java.util.List o)
          Constructor that initialises a pointer to the agents ontology
 
Method Summary
 void forget(int n)
          This function makes sure that when forgetting a meaning, the density of the layer is adapted accordingly
 int getMaxLayer()
           
 int playGame(Context cxt, int topic, int layer, boolean adapt)
          playGame controls a discrimination game.
 void setDim(int d)
          Sets the number of dimensions of the conceptual space
 void setMaxMeanings(int M)
          Sets the limit on the number of meanings#
 
Methods inherited from class LGames.DGame
getDim, playGame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iMeaning

protected int iMeaning

maxMeanings

protected int maxMeanings
Constructor Detail

HolisticDGame2

public HolisticDGame2()
Empty constructor


HolisticDGame2

public HolisticDGame2(java.util.List o)
Constructor that initialises a pointer to the agents ontology

Parameters:
o - the ontology
Method Detail

setDim

public void setDim(int d)
Sets the number of dimensions of the conceptual space

Overrides:
setDim in class DGame
Parameters:
d - the dimension

setMaxMeanings

public void setMaxMeanings(int M)
Sets the limit on the number of meanings#

Overrides:
setMaxMeanings in class DGame
Parameters:
M - the maximum number of meanings that are allowed in the agent's memory

playGame

public int playGame(Context cxt,
                    int topic,
                    int layer,
                    boolean adapt)
playGame controls a discrimination game. The function first calls a categorisation function where it categorises the featureVector of the context in relation to the ontology. It then tries to discriminate the topic from the rest of the context. If this fails, a new category is added to the ontology, otherwise the category is shifted towards the topic and possibly merged with another category if it comes too close.

Parameters:
cxt - the Context
topic - the index of the topic pointing to the topic-th element of the cxt list.
layer - the hierarchical at which the discrimination game is played
adapt - sets the learning/adaptation on (true) or off (false)
Returns:
Meaning the meaning of the topic, null if the discrimination game fails.

forget

public void forget(int n)
This function makes sure that when forgetting a meaning, the density of the layer is adapted accordingly


getMaxLayer

public int getMaxLayer()
Returns:
the 'deepest' layer that has been exploited up to now.