Class SGameEnv

java.lang.Object
  extended by SGameEnv
Direct Known Subclasses:
SGameAdvEnv

public class SGameEnv
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 core of the simulation. The GUI is in SGameGUI.java. The environemnt code is at SGameEnv.java. The controller is at SGameController.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
 double crashReward
           
 int currX
           
 int currY
           
 boolean damaged
           
 boolean m03
           
 boolean m13
           
 boolean m21
           
 boolean m33
           
 boolean m42
           
 double minReward
           
 int minStep
           
 int numberOfSteps
           
 int prize
          Prize Location.
 double totalReward
           
 boolean tracing
           
 int xDim
           
 int yDim
           
 int zeroCrossing
           
 
Constructor Summary
SGameEnv()
           
 
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

m21

public boolean m21

m42

public boolean m42

m03

public boolean m03

m13

public boolean m13

m33

public boolean m33

prize

public int prize
Prize Location.


damaged

public boolean damaged

crashReward

public double crashReward
Constructor Detail

SGameEnv

public SGameEnv()
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