LGames
Class DGame

java.lang.Object
  |
  +--LGames.DGame
Direct Known Subclasses:
CompositionalDGame2, HolisticDGame2

public class DGame
extends java.lang.Object

The class DGame implements the discrimination games. The function playGame is used to control the game.

Copyright (c) 2004 Paul Vogt


Field Summary
protected  int iMeaning
           
protected  int maxMeanings
           
 
Constructor Summary
DGame()
          Empty constructor
DGame(int M)
          Constructor with a limit on the number of meanings
DGame(java.util.List o)
          Constructor that initialises a pointer to the agents ontology
 
Method Summary
 int getDim()
           
 int playGame(Context cxt, int topic, boolean adapt)
          playGame controls a discrimination game.
 void setDim(int d)
          Sets the dimensionality of the conceptual space
 void setMaxMeanings(int M)
          Sets the limit on the number of meanings#
 
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

DGame

public DGame()
Empty constructor


DGame

public DGame(int M)
Constructor with a limit on the number of meanings

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

DGame

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

Parameters:
o - the ontology
Method Detail

setMaxMeanings

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

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

setDim

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

Parameters:
d - the dimension

getDim

public int getDim()
Returns:
the dimension of the conceptual space

playGame

public int playGame(Context cxt,
                    int topic,
                    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.
adapt - sets the learning/adaptation on (true) or off (false)
Returns:
Meaning the meaning of the topic, null if the discrimination game fails.