summaryrefslogtreecommitdiffstats
path: root/test_cases/q3/ucs_0_graph.test
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2021-08-31 13:16:22 -0500
committerToby Vincent <tobyv13@gmail.com>2021-08-31 13:16:22 -0500
commitaf648f856bb1517449e4bae86b7e7f4e326c2268 (patch)
treec4313d2ce17462b4fd4987e1103172614c5387fe /test_cases/q3/ucs_0_graph.test
initial commit
Diffstat (limited to 'test_cases/q3/ucs_0_graph.test')
-rw-r--r--test_cases/q3/ucs_0_graph.test39
1 files changed, 39 insertions, 0 deletions
diff --git a/test_cases/q3/ucs_0_graph.test b/test_cases/q3/ucs_0_graph.test
new file mode 100644
index 0000000..e8f3d4c
--- /dev/null
+++ b/test_cases/q3/ucs_0_graph.test
@@ -0,0 +1,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
+"""
+