我有同樣的問題。經過一些研究後,我發現類GraphStateNode,似乎工作。
見的代碼看起來像下面的示例:
public FirstMDP(double p1, double p2, double p3, double p4) {
this.numStates = 6;
this.dg = new GraphDefinedDomain(numStates);
// actions for initial state 0
((GraphDefinedDomain) this.dg).setTransition(0,0,1,1.); //action a
((GraphDefinedDomain) this.dg).setTransition(0,1,2,1.); //action b
((GraphDefinedDomain) this.dg).setTransition(0,2,3,1.); //action c
// actions for all the other states
((GraphDefinedDomain) this.dg).setTransition(1,0,1,1.); //action for state 1
((GraphDefinedDomain) this.dg).setTransition(2,0,4,1.); //action for state 2
((GraphDefinedDomain) this.dg).setTransition(3,0,5,1.); //action for state 3
((GraphDefinedDomain) this.dg).setTransition(4,0,2,1.); //action for state 4
((GraphDefinedDomain) this.dg).setTransition(5,0,5,1.); //action for state 5
this.domain = this.dg.generateDomain();
this.initState = new GraphStateNode(); // Initial state is created
((GraphStateNode) this.initState).setId(0); // Initial state is initialized
this.rf = new FourParamRF(p1,p2,p3,p4);
this.tf = new NullTermination();
this.hashFactory = new SimpleHashableStateFactory();
}
確保導入GraphStateNode類:
import burlap.domain.singleagent.graphdefined.GraphStateNode;
請讓我知道是否有幫助。
我已經恢復到以前的版本(可以更多)與本教程兼容。非常感謝您的回答。這將在不久的將來有用 –