|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eyelanguage.rl.reading.SentenceWorld
public class SentenceWorld
Describes how states evolve in response to actions in a serial attention and word identification model.
| Nested Class Summary | |
|---|---|
class |
SentenceWorld.StateIteratorIndividualist
|
| Field Summary | |
|---|---|
int |
ACUITY_LIMIT
Beyond this distance, visual acuity goes non-linearly to zero. |
boolean |
ACUITY_LINEAR_PENALIZE
If true, means that as word identifcation time increases linearly as fovea is distanced from attended word center; otherwise just a constant penalty for any distance from the word center |
int |
ACUITY_LINEAR_PENALTY_SLOPE
Amount of extra time required per character eccentricity. |
int |
ATTEND_INTERVAL
By how much the 'attended time' dimension is incremented on each simulated timestep. |
boolean |
CACHE_ENABLED
|
protected int |
length
|
int |
MAX_ATTEND_TIME_WITH_PENALTIES
|
int |
MAX_POSSIBLE_ACUITY_PENALTY
When sentence world is initialized, this number reflects the maximum possible penalty on word identifiation time (which is useful for knowing the bounds of the state space). |
int |
MAX_POSSIBLE_ATTEND_TIME
Maximum amount of time that could possibly be spent identifying a particular word given that we're looking at the center of the word. |
int |
MAX_POSSIBLE_ID_TIME
Maximum amount of time to identify a word, ever (is this actually used?) |
int |
MAX_POSSIBLE_PENALTY
|
int |
MAX_SACCADE_PROG_TIME
The actual amount of time it takes to program a saccade. |
int |
MIN_ATTEND_TIME_WITH_PENALTIES
|
protected java.lang.String |
name
|
int |
SACCADE_PROGRAM_INTERVAL
By how much the 'saccade program time' dimension is incremented on each simualted timestep. |
int |
SACCADE_TIME_PENALTY
The amount of time subtracted from attending a word after making a saccade. |
boolean |
SACCADIC_ERROR
Whether saccadic oculomotor error is enabled. |
boolean |
SACCADIC_ERROR_GAUSSIAN
|
double |
SACCADIC_ERROR_SPREAD
A larger value here means more error if saccadic error is enabled. |
protected java.lang.String |
sentenceString
|
ReadingStateParallelRelative |
setStartingState
|
protected java.util.HashSet |
terminalStatesCache
|
| Constructor Summary | |
|---|---|
SentenceWorld(java.lang.String newName)
|
|
SentenceWorld(java.lang.String newName,
long randomSeed)
|
|
| Method Summary | |
|---|---|
int |
acuityAdjustment(ReadingState previousState,
ReadingState newState)
If we saccade to a position, the time attended is worth less than future time that will be spent (see detail). |
int |
acuityIdentificationPenalty(int wid,
int currentEyePosition)
|
int |
acuityIdentificationPenalty(Word w,
int currentEyePosition)
|
int |
acuityIdentificationPenaltyAbsolute(int absoluteDistanceInCharacters)
|
int |
applySaccadicError(int saccadeRequestDistance)
|
protected void |
attemptAttendNextWord(ReadingState newState)
|
ReadingState |
attendCurrentWord(ReadingState newState)
|
void |
build()
Here we construct the state space for this sentence. |
int |
calculateDistFromAttendedWordCenter(ReadingState state)
|
ReadingState |
checkForAcuityLimit(ReadingState newState)
If the eyes land too eccentricly, force eyes to land within acuity limit. |
ReadingState |
checkForWordIdentification(ReadingState newState)
|
int |
distance(State state1,
State state2)
|
protected ReadingState |
executeSaccade(ReadingState oldState)
|
java.util.List |
getAllStatesFromEyePosition(int eyePosition)
|
java.util.List |
getAllStatesWhereAttendingWordAt(int eyePosition)
|
int |
getATTEND_INTERVAL()
|
int |
getCenterOfWord(int wid)
|
int |
getCenterOfWord(Word w)
|
java.util.List |
getDeadendStates()
|
boolean |
getIsBuilt()
Allows you to determine if the world has been built yet or not. |
int |
getMAX_ATTEND_TIME_WITH_PENALTIES()
Getter for property MAX_ATTEND_TIME_WITH_PENALTIES. |
int |
getMAX_POSSIBLE_ATTEND_TIME()
|
int |
getMAX_POSSIBLE_ID_TIME()
|
int |
getMAX_SACCADE_PROG_TIME()
|
int |
getMIN_ATTEND_TIME_WITH_PENALTIES()
|
java.lang.String |
getName()
|
ReadingState |
getNewState(ReadingState rs,
ReadingAction ra)
|
State |
getNewState(State oldGenericState,
Action genericAction)
This critical method returns the new state given an action from an old state, and in this case, simply adds state to position to simulate movement. |
State |
getNewState(State oldGenericState,
Action genericAction,
java.lang.String r)
|
int |
getNumberOfPositions()
|
int |
getNumberOfStates()
|
int |
getNumWords()
|
java.util.List<java.lang.Integer> |
getPossibleEyePositions(Word thisWord)
|
java.util.List |
getPossibleEyePositionsSlow(Word thisWord)
|
State |
getRandomState()
|
int |
getSACCADE_PROGRAM_INTERVAL()
|
int |
getSACCADE_TIME_PENALTY()
|
int |
getSentenceLength()
|
java.lang.String |
getSettings()
|
State |
getStartingState()
|
ReadingStateFactory |
getStateFactory()
|
java.util.List |
getStateList()
Returns a list of all the states (i.e. |
java.util.HashSet |
getTerminalStates_notUsed()
|
java.util.HashSet |
getTerminalStates()
|
Word |
getWord(int id)
|
Word |
getWordAtEyePosition(int eyePosition)
|
protected int |
getWordLengthOrZero(int id)
|
protected double |
getWordPredictabilityOrZero(int id)
|
void |
growBounds(State state)
|
boolean |
isLastWordID(int wordID)
|
boolean |
isOnWord(int eyePosition)
|
boolean |
isTerminalState(State state)
Reports whether this particular state is a terminal state. |
static void |
main(java.lang.String[] args)
|
protected int |
maxOf(int a,
int b)
|
protected int |
minOf(int a,
int b)
|
void |
setATTEND_INTERVAL(int ATTEND_INTERVAL)
|
void |
setBoundedBufferSize(int n)
|
void |
setMAX_POSSIBLE_ATTEND_TIME(int MAX_POSSIBLE_ATTEND_TIME)
|
void |
setMAX_POSSIBLE_ID_TIME(int MAX_POSSIBLE_ID_TIME)
|
void |
setMAX_SACCADE_PROG_TIME(int MAX_SACCADE_PROG_TIME)
|
void |
setRequester(java.lang.String r)
|
void |
setSACCADE_PROGRAM_INTERVAL(int SACCADE_PROGRAM_INTERVAL)
|
void |
setSACCADE_TIME_PENALTY(int SACCADE_TIME_PENALTY)
|
void |
setSentence(java.lang.String newSentenceString,
java.lang.String predictabilities,
java.lang.String minIDTimes)
|
void |
setSentence(java.lang.String newSentenceString,
java.lang.String predictabilities,
java.lang.String minIDTimes,
java.lang.String lengths,
boolean lengthsManuallyOverridden)
|
void |
setupReadingStateFactory(int kind)
|
void |
setupReadingStateFactory(int kind,
boolean pooling)
|
java.util.Iterator |
stateIterator()
Returns an object which lets you iterate over all states (positions) in the world. |
java.lang.String |
toString()
|
protected int |
totalIdentificationTimePlusAcuityEffect(int wid,
int fromEyePosition)
|
protected int |
totalIdentificationTimePlusAcuityEffect(Word w,
int fromEyePosition)
|
java.lang.String |
toText()
Returns a text representation of the world, if possible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int ACUITY_LIMIT
public int ATTEND_INTERVAL
public boolean ACUITY_LINEAR_PENALIZE
public int ACUITY_LINEAR_PENALTY_SLOPE
public int SACCADE_PROGRAM_INTERVAL
public int MAX_POSSIBLE_ID_TIME
public int MAX_SACCADE_PROG_TIME
public int MAX_POSSIBLE_ACUITY_PENALTY
public int MAX_POSSIBLE_ATTEND_TIME
public int MAX_POSSIBLE_PENALTY
public double SACCADIC_ERROR_SPREAD
public int SACCADE_TIME_PENALTY
public int MIN_ATTEND_TIME_WITH_PENALTIES
public int MAX_ATTEND_TIME_WITH_PENALTIES
public boolean SACCADIC_ERROR
protected int length
protected java.lang.String sentenceString
protected java.lang.String name
public boolean CACHE_ENABLED
public boolean SACCADIC_ERROR_GAUSSIAN
public ReadingStateParallelRelative setStartingState
protected java.util.HashSet terminalStatesCache
| Constructor Detail |
|---|
public SentenceWorld(java.lang.String newName,
long randomSeed)
public SentenceWorld(java.lang.String newName)
| Method Detail |
|---|
protected int minOf(int a,
int b)
protected int maxOf(int a,
int b)
public void growBounds(State state)
public static void main(java.lang.String[] args)
public int acuityAdjustment(ReadingState previousState,
ReadingState newState)
public int calculateDistFromAttendedWordCenter(ReadingState state)
protected int totalIdentificationTimePlusAcuityEffect(int wid,
int fromEyePosition)
protected int totalIdentificationTimePlusAcuityEffect(Word w,
int fromEyePosition)
public int getCenterOfWord(Word w)
public int getCenterOfWord(int wid)
public void setRequester(java.lang.String r)
public State getNewState(State oldGenericState,
Action genericAction,
java.lang.String r)
public State getNewState(State oldGenericState,
Action genericAction)
getNewState in interface Worldpublic ReadingState checkForAcuityLimit(ReadingState newState)
public int applySaccadicError(int saccadeRequestDistance)
protected ReadingState executeSaccade(ReadingState oldState)
public ReadingState checkForWordIdentification(ReadingState newState)
public ReadingState attendCurrentWord(ReadingState newState)
protected int getWordLengthOrZero(int id)
protected double getWordPredictabilityOrZero(int id)
protected void attemptAttendNextWord(ReadingState newState)
public ReadingState getNewState(ReadingState rs,
ReadingAction ra)
public int distance(State state1,
State state2)
public int getSentenceLength()
public void setSentence(java.lang.String newSentenceString,
java.lang.String predictabilities,
java.lang.String minIDTimes)
public void setSentence(java.lang.String newSentenceString,
java.lang.String predictabilities,
java.lang.String minIDTimes,
java.lang.String lengths,
boolean lengthsManuallyOverridden)
public int acuityIdentificationPenalty(int wid,
int currentEyePosition)
public int acuityIdentificationPenalty(Word w,
int currentEyePosition)
public int acuityIdentificationPenaltyAbsolute(int absoluteDistanceInCharacters)
public boolean isTerminalState(State state)
World
isTerminalState in interface Worldpublic int getNumberOfPositions()
public java.util.HashSet getTerminalStates()
public java.util.HashSet getTerminalStates_notUsed()
public java.util.List getDeadendStates()
public void setupReadingStateFactory(int kind,
boolean pooling)
public void setupReadingStateFactory(int kind)
public void build()
build in interface Worldpublic java.util.Iterator stateIterator()
World
stateIterator in interface Worldpublic void setBoundedBufferSize(int n)
public java.util.List getAllStatesFromEyePosition(int eyePosition)
public boolean isOnWord(int eyePosition)
public Word getWordAtEyePosition(int eyePosition)
public java.util.List getAllStatesWhereAttendingWordAt(int eyePosition)
public java.util.List<java.lang.Integer> getPossibleEyePositions(Word thisWord)
public java.util.List getPossibleEyePositionsSlow(Word thisWord)
public java.lang.String getSettings()
public java.lang.String toText()
World
toText in interface Worldpublic java.lang.String toString()
toString in class java.lang.Objectpublic int getNumWords()
public Word getWord(int id)
public boolean isLastWordID(int wordID)
public java.lang.String getName()
public boolean getIsBuilt()
World
getIsBuilt in interface Worldpublic int getATTEND_INTERVAL()
public void setATTEND_INTERVAL(int ATTEND_INTERVAL)
public int getSACCADE_PROGRAM_INTERVAL()
public void setSACCADE_PROGRAM_INTERVAL(int SACCADE_PROGRAM_INTERVAL)
public int getMAX_POSSIBLE_ID_TIME()
public void setMAX_POSSIBLE_ID_TIME(int MAX_POSSIBLE_ID_TIME)
public int getMAX_SACCADE_PROG_TIME()
public void setMAX_SACCADE_PROG_TIME(int MAX_SACCADE_PROG_TIME)
public int getMAX_POSSIBLE_ATTEND_TIME()
public void setMAX_POSSIBLE_ATTEND_TIME(int MAX_POSSIBLE_ATTEND_TIME)
public int getSACCADE_TIME_PENALTY()
public void setSACCADE_TIME_PENALTY(int SACCADE_TIME_PENALTY)
public int getMIN_ATTEND_TIME_WITH_PENALTIES()
public int getMAX_ATTEND_TIME_WITH_PENALTIES()
public int getNumberOfStates()
getNumberOfStates in interface Worldpublic ReadingStateFactory getStateFactory()
public State getStartingState()
getStartingState in interface Worldpublic State getRandomState()
public java.util.List getStateList()
World
getStateList in interface World
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||