All Packages  This Package  Class Hierarchy  Class Search  Index

Class aima.examples.RiskNoRiskGame

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----aima.examples.OurButton
                           |
                           +----aima.examples.RiskNoRiskGame

A Risk vs. No-Risk game An example JavaBean environment. The interaction between the environment and an agent is executed as its own separate thread. The interaction thread sleeps every percept-action pair so that it's possible to see something happening.


public class  RiskNoRiskGame
     extends aima.examples.OurButton
     implements aima.cs.learning.intActionListener, 
                java.lang.Runnable
{
          // Constructors 1
     public RiskNoRiskGame();

          // Methods 22
     public synchronized void addStateReward_PerceptListener(StateReward_PerceptListener);
     protected int agentActionCorrect(int);
     public synchronized void fireAction();
     public double getDiscountFactor();
     public int getEpochCount();
     public double getScoreDecay();
     public int getSleepInterval();
     public boolean getStopped();
     public int getVerbosity();
     public synchronized void intActionPerformed(intActionEvent);
     public synchronized void removeStateReward_PerceptListener(StateReward_PerceptListener);
     public void run();
     protected boolean sendPercept();
     protected boolean sendTerminalPercept();
     public void setDiscountFactor(double);
     public void setEpochCount(int);
     public void setScoreDecay(double);
     public void setSleepInterval(int);
     public void setStopped(boolean);
     public void setVerbosity(int);
     public synchronized void startRun();
     public synchronized void stopRun();
}



Constructors


RiskNoRiskGame

   public RiskNoRiskGame() 



Methods


setStopped

   public void setStopped(boolean s) 


getStopped

   public boolean getStopped() 


setEpochCount

   public void setEpochCount(int n) 


getEpochCount

   public int getEpochCount() 


addStateReward_PerceptListener

   public synchronized void addStateReward_PerceptListener(StateReward_PerceptListener l) 


removeStateReward_PerceptListener

   public synchronized void removeStateReward_PerceptListener(StateReward_PerceptListener l) 


intActionPerformed

   public synchronized void intActionPerformed(intActionEvent e) 
Implements:
intActionPerformed in interface intActionListener


fireAction

   public synchronized void fireAction() 

Deal with button press. Note that this doesn't necessarily fire an action any more.

Overrides:
fireAction in class OurButton


startRun

   public synchronized void startRun() 


stopRun

   public synchronized void stopRun() 


run

   public void run() 

Main environment-agent interaction loop.

Implements:
run in interface Runnable


agentActionCorrect

   protected int agentActionCorrect(int action) 


sendPercept

   protected boolean sendPercept() 


sendTerminalPercept

   protected boolean sendTerminalPercept() 


setSleepInterval

   public void setSleepInterval(int n) 


getSleepInterval

   public int getSleepInterval() 


setVerbosity

   public void setVerbosity(int n) 


getVerbosity

   public int getVerbosity() 


setScoreDecay

   public void setScoreDecay(double d) 


getScoreDecay

   public double getScoreDecay() 


setDiscountFactor

   public void setDiscountFactor(double d) 


getDiscountFactor

   public double getDiscountFactor() 


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4