public class TheSpiderAndTheFly extends StochasticShortestPath<examples.jmdp.Distance,examples.jmdp.SpiderAction>
| Constructor and Description |
|---|
TheSpiderAndTheFly(int between,
double moveCost,
double stayCost,
double p) |
| Modifier and Type | Method and Description |
|---|---|
Actions<examples.jmdp.SpiderAction> |
feasibleActions(examples.jmdp.Distance i)
This method return all possible action which could be taken from a StateC
i, it is preferred that you create an action which makes the terminal
state becomes an absorbing state.
|
double |
immediateCost(examples.jmdp.Distance i,
examples.jmdp.SpiderAction a)
This method is easy to design, the immediate reward is directly
associated with the incurred action, in that way, you have to associate a
reward with the action taken.
|
static void |
main(java.lang.String[] args)
In this method you have to generate the problem then insert it into the
solver and finally solve the problem.
|
double |
prob(examples.jmdp.Distance i,
examples.jmdp.Distance j,
examples.jmdp.SpiderAction a)
This method return the associate transition probability between two
states by taking an action.
|
States<examples.jmdp.Distance> |
reachable(examples.jmdp.Distance i,
examples.jmdp.SpiderAction a)
Set of states that can be reached from this state i, after
taking the action a.
|
modifiedProbgetSteadyStateProbabilities, setProbabilitySolver, solvegetAllStates, getNumStates, getSolverdebug, debug, debug, getDebugLevel, getOptimalPolicy, getOptimalValueFunction, getReporter, isFinite, isSolved, operation, printSolution, printSolution, setDebugLevel, setReporter, setSolver, solvepublic TheSpiderAndTheFly(int between,
double moveCost,
double stayCost,
double p)
between - moveCost - p - stayCost - public double immediateCost(examples.jmdp.Distance i,
examples.jmdp.SpiderAction a)
immediateCost in class DTMDP<examples.jmdp.Distance,examples.jmdp.SpiderAction>i - Current Statea - Current ActionDTMDP.immediateCost(State, Action)public double prob(examples.jmdp.Distance i,
examples.jmdp.Distance j,
examples.jmdp.SpiderAction a)
prob in class DTMDP<examples.jmdp.Distance,examples.jmdp.SpiderAction>i - Current state.j - Destination Statea - ActionDTMDP.prob(State, State, Action)public States<examples.jmdp.Distance> reachable(examples.jmdp.Distance i, examples.jmdp.SpiderAction a)
DTMDPpublic Actions<examples.jmdp.SpiderAction> feasibleActions(examples.jmdp.Distance i)
feasibleActions in class InfiniteMDP<examples.jmdp.Distance,examples.jmdp.SpiderAction>i - Current StateInfiniteMDP.feasibleActions(State)public static void main(java.lang.String[] args)
args -