public class SGNaiveQFactory extends java.lang.Object implements AgentFactory
SGNaiveQLAgent
s.Modifier and Type | Field and Description |
---|---|
protected double |
defaultQ
The default Q-value to which Q-values will be initialized
|
protected double |
discount
The discount rate the Q-learning algorithm will use
|
protected SGDomain |
domain
The stochastic games domain in which the agent will act
|
protected double |
learningRate
The learning rate the Q-learning algorithm will use
|
protected HashableStateFactory |
stateHash
The state hashing factory the Q-learning algorithm will use
|
protected StateAbstraction |
storedAbstraction
The state abstract the Q-learning algorithm will use
|
Constructor and Description |
---|
SGNaiveQFactory(SGDomain domain,
double discount,
double learningRate,
double defaultQ,
HashableStateFactory stateHash)
Initializes the factory.
|
SGNaiveQFactory(SGDomain domain,
double discount,
double learningRate,
double defaultQ,
HashableStateFactory stateHash,
StateAbstraction storedAbstraction)
Initializes the factory.
|
Modifier and Type | Method and Description |
---|---|
SGAgent |
generateAgent()
Returns a new agent instance.
|
void |
setStoredAbstraction(StateAbstraction abs)
Sets the factory to provide Q-learning algorithms with the given state abstraction.
|
protected SGDomain domain
protected double discount
protected double learningRate
protected double defaultQ
protected HashableStateFactory stateHash
protected StateAbstraction storedAbstraction
public SGNaiveQFactory(SGDomain domain, double discount, double learningRate, double defaultQ, HashableStateFactory stateHash)
domain
- The stochastic games domain in which the agent will actdiscount
- The discount rate the Q-learning algorithm will uselearningRate
- The learning rate the Q-learning algorithm will usedefaultQ
- The default Q-value to which Q-values will be initializedstateHash
- The state hashing factory the Q-learning algorithm will usepublic SGNaiveQFactory(SGDomain domain, double discount, double learningRate, double defaultQ, HashableStateFactory stateHash, StateAbstraction storedAbstraction)
domain
- The stochastic games domain in which the agent will actdiscount
- The discount rate the Q-learning algorithm will uselearningRate
- The learning rate the Q-learning algorithm will usedefaultQ
- The default Q-value to which Q-values will be initializedstateHash
- The state hashing factory the Q-learning algorithm will usestoredAbstraction
- the state abstraction the Q-learning algorithm will usepublic void setStoredAbstraction(StateAbstraction abs)
abs
- the state abstraction to usepublic SGAgent generateAgent()
AgentFactory
generateAgent
in interface AgentFactory