ThreadIntermediary¶
-
public class
ThreadIntermediary
implements Runnable¶ An intermediary allowing for the trading of states and actions between the agent and the environment.
Author: The Condor
Methods¶
retrieveState¶
-
public synchronized ViewAndNextLatch
retrieveState
()¶ Get the current state and a latch to await for the next state.
Returns: A structure with a StateView and a CountDownLatch. The former is null when no state was set before.
submitState¶
-
public synchronized CountDownLatch
submitState
(StateView stateView, HistoryView historyView, StateType stateType)¶ Submit a state and its type, receiving a latch for the agent’s action.
Parameters: - stateView –
- stateType –
Returns: A latch whose countdown indicates that the agent has responded with an action.