Class TGameEnv

java.lang.Object
  extended by TGameEnv
Direct Known Subclasses:
TGameEnvRand

public class TGameEnv
extends java.lang.Object

This applet demonstrates a simple game. It isn't designed to be general or reusable.

Copyright (C) 2006 David Poole.

This program gives the environment of the simulation. The GUI is in TGameGUI.java. The environemnt code is at TGameEnv.java. The controller is at TGameController.java.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


Field Summary
 int currX
           
 int currY
           
 double minReward
           
 int minStep
           
 int numberOfSteps
           
 double reward
           
 double totalReward
           
 boolean tracing
           
 int xDim
           
 int yDim
           
 int zeroCrossing
           
 
Constructor Summary
TGameEnv()
           
 
Method Summary
 void doreset()
          resets the number of steps and the reward.
 double dostep(int action)
          does one step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xDim

public final int xDim
See Also:
Constant Field Values

yDim

public final int yDim
See Also:
Constant Field Values

numberOfSteps

public int numberOfSteps

totalReward

public double totalReward

minReward

public double minReward

minStep

public int minStep

zeroCrossing

public int zeroCrossing

currX

public int currX

currY

public int currY

tracing

public boolean tracing

reward

public double reward
Constructor Detail

TGameEnv

public TGameEnv()
Method Detail

doreset

public void doreset()
resets the number of steps and the reward.


dostep

public double dostep(int action)
does one step.

The actions are

Parameters:
action - the action that the agent does
Returns:
reward