LGames
Class CompositionalDGame2

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

public class CompositionalDGame2
extends DGame

The class CompositionalDGame2 implements the discrimination games in the compositional set-up. The function playGame is used to control the game.

Copyright (c) 2004 Paul Vogt


Field Summary
 
Fields inherited from class LGames.DGame
iMeaning, maxMeanings
 
Constructor Summary
CompositionalDGame2()
          Empty constructor
CompositionalDGame2(int m)
          Constructor that specifies the holistic conceptual space
CompositionalDGame2(int m, java.util.List o)
          Constructor that specifies the holistic conceptual space, and sets a pointer to the agent's ontology
 
Method Summary
 IntArray decayWeights()
          Currently not used
 IntArray getDCS(int topic)
          returns the distinctive category set.
 Meaning getTopic(int topic)
          returns the Meaning representation of the topic
 int playGame(Context cxt, int topic, int timestamp, boolean adapt)
          playGame controls a discrimination game.
 void test()
          Function to test the algorithm.
 
Methods inherited from class LGames.DGame
getDim, playGame, setDim, setMaxMeanings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositionalDGame2

public CompositionalDGame2()
Empty constructor


CompositionalDGame2

public CompositionalDGame2(int m)
Constructor that specifies the holistic conceptual space

Parameters:
m - the `cover' of the conceptual space (integer representation of the bit-string indicating which dimensions are used.

CompositionalDGame2

public CompositionalDGame2(int m,
                           java.util.List o)
Constructor that specifies the holistic conceptual space, and sets a pointer to the agent's ontology

Parameters:
m - the `cover' of the conceptual space (integer representation of the bit-string indicating which dimensions are used.
o - the ontology
Method Detail

test

public void test()
Function to test the algorithm. Used to set an artificial category set.


playGame

public int playGame(Context cxt,
                    int topic,
                    int timestamp,
                    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.
timestamp - the current time (language game)
adapt - sets learning on (true) or off (false)
Returns:
topic if DG succeeds, -1 otherwise.

decayWeights

public IntArray decayWeights()
Currently not used


getDCS

public IntArray getDCS(int topic)
returns the distinctive category set.


getTopic

public Meaning getTopic(int topic)
returns the Meaning representation of the topic