Skip to content

Commit

Permalink
Merge pull request #7 from virtual-labs/dev
Browse files Browse the repository at this point in the history
added explanations to tests
  • Loading branch information
Ronak-Dhingra authored Apr 10, 2024
2 parents e7c1bd0 + 365de6d commit 1930ca0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 55 deletions.
54 changes: 26 additions & 28 deletions experiment/posttest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
{
"question": "Let h be the h value of the start node. What are the g and f values for the start node?",
"answers": {
"a": "g = 0, f = 2h",
"a": "g = 0 (zero), f = 2h",
"b": "g = h, f = h",
"c": "g = 0, f = h",
"d": "g = h, f = 0"
"c": "g = 0 (zero), f = h",
"d": "g = h, f = 0 (zero)"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "",
"b": "",
"c": "",
"d": ""
},
"correctAnswer": "c",
"difficulty": "beginner"
Expand All @@ -24,13 +24,13 @@
"a": "h value",
"b": "g value",
"c": "f value",
"d": "None of the above"
"d": ""
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "",
"b": "",
"c": "",
"d": ""
},
"correctAnswer": "c",
"difficulty": "beginner"
Expand All @@ -42,10 +42,8 @@
"b": "no"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "Try to make an example where this is true",
"b": "Explanation 2"
},
"correctAnswer": "a",
"difficulty": "intermediate"
Expand All @@ -59,10 +57,10 @@
"d": "UCS is uninformed search, and A* is informed search ordered by f value"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "There is no heuristic in UCS",
"b": "A* is informed search",
"c": "A* is ordered by f value",
"d": "Refer to UCS experiment"
},
"correctAnswer": "d",
"difficulty": "intermediate"
Expand All @@ -76,10 +74,10 @@
"d": "No"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "Whenever A* selects a node for expansion (smallest f value in frontier), the optimal path to that node has been found",
"b": "",
"c": "",
"d": ""
},
"correctAnswer": "a",
"difficulty": "advanced"
Expand All @@ -93,10 +91,10 @@
"d": "All of the above"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "",
"b": "",
"c": "",
"d": "Check reference 1 for the proof"
},
"correctAnswer": "d",
"difficulty": "advanced"
Expand Down
54 changes: 27 additions & 27 deletions experiment/pretest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
"d": "Regular Queue"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "",
"b": "",
"c": "Nodes are expanded in order of their f values.",
"d": ""
},
"correctAnswer": "c",
"difficulty": "beginner"
},
{
"question": "Is A* an informed or uninformed search algorithm?",
"answers": {
"a": "informed",
"b": "uninformed"
"a": "Informed",
"b": "Uninformed"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2"
"a": "The heuristic function is problem-specific knowledge to help 'inform' solutions",
"b": ""
},
"correctAnswer": "a",
"difficulty": "beginner"
Expand All @@ -40,8 +40,8 @@
"d": "Estimates the cost of the cheapest path from the start node to the goal node."
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2"
"a": "",
"b": ""
},
"correctAnswer": "b",
"difficulty": "intermediate"
Expand All @@ -50,13 +50,13 @@
"question": "In A* search, what does the f value represent?",
"answers": {
"a": "It represents the heuristic value of the current node.",
"b": "It represents the total estimated cost of the path from the start node to the goal node.",
"c": "It represents the cost of the cheapest path found from the start node to the current node.",
"b": "It represents the cost of the cheapest path found from the current node to the goal node.",
"c": "It represents the actual cost of the path from the start node to the current node.",
"d": "It represents the sum of the actual cost from the start node to the current node and the estimated cost from the current node to the goal node."
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2"
"a": "",
"b": ""
},
"correctAnswer": "d",
"difficulty": "intermediate"
Expand All @@ -70,27 +70,27 @@
"d": "If the heuristic is consistent, it is complete and optimal."
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "",
"b": "",
"c": "",
"d": "Check reference 1 for the proof"
},
"correctAnswer": "d",
"difficulty": "advanced"
},
{
"question": "Which of the following scenarios would result in A* search performing poorly or even failing to find the optimal solution?",
"question": "When could A* perform worse than breadth-first search?",
"answers": {
"a": "When the graph has a high branching factor and the heuristic function is not informative",
"b": "When the heuristic function is consistent but not admissible",
"c": "When the heuristic function always returns a constant value",
"d": "When the graph contains cycles"
"a": "When the heuristic function is not admissible",
"b": "When the heuristic function is consistent",
"c": "When the search space is infinite",
"d": "When the cost of the optimal solution is high"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "A* may unnecessarily expand nodes and find suboptimal solutions.",
"b": "A* would be optimal under this condition.",
"c": "A* is still better than breadth-first search in this case.",
"d": "A* would still be optimal under this condition."
},
"correctAnswer": "a",
"difficulty": "advanced"
Expand Down

0 comments on commit 1930ca0

Please sign in to comment.