summaryrefslogtreecommitdiffstats
path: root/test_cases/q3/ucs_0_graph.test
blob: e8f3d4c1a916872ad1a95544b143b29782b5908b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class: "GraphSearchTest"
algorithm: "uniformCostSearch"

diagram: """
          C
          ^
          | 2
     2    V   4 
*A <----> B -----> [H]
          |1 
     1.5  V  2.5
 G <----- D -----> E
          |
        2 | 
          V
         [F]

A is the start state, F and H is the goal.  Arrows mark possible state 
transitions.  The number next to the arrow is the cost of that transition.
"""
# The following section specifies the search problem and the solution.
# The graph is specified by first the set of start states, followed by
# the set of goal states, and lastly by the state transitions which are
# of the form: 
#      <start state> <actions> <end state> <cost>
graph: """
start_state: A
goal_states: H F
A Right B 2.0
B Right H 4.0
B Down D 1.0
B Up C 2.0
B Left A 2.0
C Down B 2.0
D Right E 2.5
D Down F 2.0
D Left G 1.5
"""