|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--interfaces.Controller | +--QLR3new
Fields inherited from class interfaces.Controller |
SENSOR_TYPE_LIGHT, SENSOR_TYPE_TOUCH |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
QLR3new()
|
Method Summary | |
void |
begin()
Sets the system going |
AbstractRobot |
getRobot()
Returns the AbstractRobot associated with this controller |
int[] |
getSensors()
Returns an array of the sensors used by this controller, and the type of sensor required. |
void |
halt()
Stops this controller's thread running, i.e. |
void |
initController(AbstractRobot r)
Methods required by Controller |
void |
initTable()
Initialises the Q-table entries to 0.0 |
void |
pause()
|
int |
Q(int STATE)
The main Q(s,a) function |
int |
rand(int limit)
Generates a random number between 0 and the limit |
void |
run()
Starts this controller's thread running. |
void |
unpause()
|
void |
updateTable()
Updates the utility table according to the Q learning equation |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public QLR3new()
Method Detail |
public void initController(AbstractRobot r)
initController
in class Controller
interfaces.Controller
r
- the AbstractRobot associated with this controllerpublic int[] getSensors()
Controller
getSensors
in class Controller
interfaces.Controller
public void run()
Controller
run
in class Controller
public void halt()
Controller
halt
in class Controller
public AbstractRobot getRobot()
Controller
getRobot
in class Controller
interfaces.Controller
public int rand(int limit)
limit
- public void initTable()
public void updateTable()
public int Q(int STATE)
public void begin()
public void pause()
pause
in class Controller
public void unpause()
unpause
in class Controller
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |