def getIDSData(goal): res = iterativeDeepeningSearch(startState,actionsF,takeActionF, lambda (s): s==goal, 20) depth = len(res) - 1 # not counting start state.. nodes = getNodeCount() branchf = ebf(nodes, depth) return depth, nodes, branchf
def getIDSData(goal): res = iterativeDeepeningSearch(startState, actionsF, takeActionF, lambda (s): s == goal, 20) depth = len(res) - 1 # not counting start state.. nodes = getNodeCount() branchf = ebf(nodes, depth) return depth, nodes, branchf
def getRBFSData(goal, hfunc): def goalTest(state): return state == goal def takeAction(state, action): return takeActionF(state, action), 1 res = RBFS(startState, actionsF, takeAction, goalTest, hfunc) depth = len(res[0]) - 1 # not counting start state.. nodes = getNCount() branchf = ebf(nodes, depth) return depth, nodes, branchf