fix: a star in docs
This commit is contained in:
1
logic/test_cases/CONFIG
Normal file
1
logic/test_cases/CONFIG
Normal file
@ -0,0 +1 @@
|
||||
order: "q1 q2 q3 q4 q5 q6 q7 q8"
|
2
logic/test_cases/q1/CONFIG
Normal file
2
logic/test_cases/q1/CONFIG
Normal file
@ -0,0 +1,2 @@
|
||||
class: "PassAllTestsQuestion"
|
||||
max_points: "2"
|
3
logic/test_cases/q1/correctSentence1.solution
Normal file
3
logic/test_cases/q1/correctSentence1.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q1/correctSentence1.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "((A | B) & (~A <=> (~B | C)) & (~A | ~B | C))"
|
9
logic/test_cases/q1/correctSentence1.test
Normal file
9
logic/test_cases/q1/correctSentence1.test
Normal file
@ -0,0 +1,9 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logicPlan.sentence1()"
|
||||
|
3
logic/test_cases/q1/correctSentence2.solution
Normal file
3
logic/test_cases/q1/correctSentence2.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q1/correctSentence2.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "((C <=> (B | D)) & (A >> (~B & ~D)) & (~(B & ~C) >> A) & (~D >> C))"
|
9
logic/test_cases/q1/correctSentence2.test
Normal file
9
logic/test_cases/q1/correctSentence2.test
Normal file
@ -0,0 +1,9 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logicPlan.sentence2()"
|
||||
|
3
logic/test_cases/q1/correctSentence3.solution
Normal file
3
logic/test_cases/q1/correctSentence3.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q1/correctSentence3.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "((PacmanAlive_1 <=> ((PacmanAlive_0 & ~PacmanKilled_0) | (~PacmanAlive_0 & PacmanBorn_0))) & ~(PacmanAlive_0 & PacmanBorn_0) & PacmanBorn_0)"
|
9
logic/test_cases/q1/correctSentence3.test
Normal file
9
logic/test_cases/q1/correctSentence3.test
Normal file
@ -0,0 +1,9 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logicPlan.sentence3()"
|
||||
|
3
logic/test_cases/q1/entails.solution
Normal file
3
logic/test_cases/q1/entails.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q1/entails.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "True True False True True False"
|
22
logic/test_cases/q1/entails.test
Normal file
22
logic/test_cases/q1/entails.test
Normal file
@ -0,0 +1,22 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
|
||||
ans = [logicPlan.entails(A & B, A), logicPlan.entails(A & B, A | B), logicPlan.entails(A | B, A), logicPlan.entails(~(A & B & C & D), ~A | ~B | ~C | ~D), logicPlan.entails(A >> B, B | ~A), logicPlan.entails(A >> B, A)]
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "ans"
|
||||
|
||||
|
3
logic/test_cases/q1/entailsLong.solution
Normal file
3
logic/test_cases/q1/entailsLong.solution
Normal file
File diff suppressed because one or more lines are too long
20
logic/test_cases/q1/entailsLong.test
Normal file
20
logic/test_cases/q1/entailsLong.test
Normal file
File diff suppressed because one or more lines are too long
3
logic/test_cases/q1/findModelSentence1.solution
Normal file
3
logic/test_cases/q1/findModelSentence1.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q1/findModelSentence1.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "[(A, False), (B, True), (C, True)]"
|
10
logic/test_cases/q1/findModelSentence1.test
Normal file
10
logic/test_cases/q1/findModelSentence1.test
Normal file
@ -0,0 +1,10 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logicPlan.modelToString(logicPlan.findModel(logicPlan.sentence1()))"
|
||||
|
||||
|
3
logic/test_cases/q1/findModelSentence2.solution
Normal file
3
logic/test_cases/q1/findModelSentence2.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q1/findModelSentence2.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "False"
|
9
logic/test_cases/q1/findModelSentence2.test
Normal file
9
logic/test_cases/q1/findModelSentence2.test
Normal file
@ -0,0 +1,9 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logicPlan.modelToString(logicPlan.findModel(logicPlan.sentence2()))"
|
||||
|
3
logic/test_cases/q1/findModelSentence3.solution
Normal file
3
logic/test_cases/q1/findModelSentence3.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q1/findModelSentence3.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "[(PacmanAlive_0, False), (PacmanAlive_1, True), (PacmanBorn_0, True), (PacmanKilled_0, False)]"
|
9
logic/test_cases/q1/findModelSentence3.test
Normal file
9
logic/test_cases/q1/findModelSentence3.test
Normal file
@ -0,0 +1,9 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logicPlan.modelToString(logicPlan.findModel(logicPlan.sentence3()))"
|
||||
|
3
logic/test_cases/q1/findModelUnderstandingCheck.solution
Normal file
3
logic/test_cases/q1/findModelUnderstandingCheck.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q1/findModelUnderstandingCheck.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "[(a, True)]"
|
10
logic/test_cases/q1/findModelUnderstandingCheck.test
Normal file
10
logic/test_cases/q1/findModelUnderstandingCheck.test
Normal file
@ -0,0 +1,10 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logicPlan.modelToString(logicPlan.findModelUnderstandingCheck())"
|
||||
|
||||
|
3
logic/test_cases/q1/plTrueInverse.solution
Normal file
3
logic/test_cases/q1/plTrueInverse.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q1/plTrueInverse.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "[(A, True)] does not satisfy ~A : True. [(A, True)] does not satisfy A : False. [(A, False), (B, True)] does not satisfy ~(A >> B) : True. [(A, False), (B, True)] does not satisfy (A >> B) : False. [(A, False), (B, True), (C, True)] does not satisfy ~((A | B) & (~A <=> (~B | C)) & (~A | ~B | C)) : True. [(A, False), (B, True), (C, True)] does not satisfy ((A | B) & (~A <=> (~B | C)) & (~A | ~B | C)) : False. [(PacmanAlive_0, False), (PacmanAlive_1, True), (PacmanBorn_0, True), (PacmanKilled_0, False)] does not satisfy ~((PacmanAlive_1 <=> ((PacmanAlive_0 & ~PacmanKilled_0) | (~PacmanAlive_0 & PacmanBorn_0))) & ~(PacmanAlive_0 & PacmanBorn_0) & PacmanBorn_0) : True. [(PacmanAlive_0, False), (PacmanAlive_1, True), (PacmanBorn_0, True), (PacmanKilled_0, False)] does not satisfy ((PacmanAlive_1 <=> ((PacmanAlive_0 & ~PacmanKilled_0) | (~PacmanAlive_0 & PacmanBorn_0))) & ~(PacmanAlive_0 & PacmanBorn_0) & PacmanBorn_0) : False. "
|
30
logic/test_cases/q1/plTrueInverse.test
Normal file
30
logic/test_cases/q1/plTrueInverse.test
Normal file
@ -0,0 +1,30 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
from logicPlan import plTrueInverse, findModel, sentence1, sentence3, modelToString
|
||||
|
||||
A = logic.PropSymbolExpr('A')
|
||||
B = logic.PropSymbolExpr('B')
|
||||
|
||||
results = {}
|
||||
for expr in [A, A >> B, sentence1(), sentence3()]:
|
||||
model = findModel(expr)
|
||||
results[~expr] = plTrueInverse(model, ~expr), model
|
||||
results[expr] = plTrueInverse(model, expr), model
|
||||
|
||||
ans = ''
|
||||
for key, value in results.items():
|
||||
ans += modelToString(value[1]) + ' does not satisfy ' + repr(key) + ' : ' + str(value[0]) + '. '
|
||||
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "ans"
|
||||
|
||||
|
2
logic/test_cases/q2/CONFIG
Normal file
2
logic/test_cases/q2/CONFIG
Normal file
@ -0,0 +1,2 @@
|
||||
class: "PassAllTestsQuestion"
|
||||
max_points: "2"
|
3
logic/test_cases/q2/atLeastOne.solution
Normal file
3
logic/test_cases/q2/atLeastOne.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/atLeastOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "False True True"
|
33
logic/test_cases/q2/atLeastOne.test
Normal file
33
logic/test_cases/q2/atLeastOne.test
Normal file
@ -0,0 +1,33 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
atleast1 = logicPlan.atLeastOne(symbols)
|
||||
|
||||
model1 = {A:False, B:False, C:False, D:False}
|
||||
model2 = {A:False, B:True, C:False, D:False}
|
||||
model3 = {A:True, B:True, C:False, D:False}
|
||||
|
||||
ans1 = logic.pl_true(atleast1,model1)
|
||||
ans2 = logic.pl_true(atleast1,model2)
|
||||
ans3 = logic.pl_true(atleast1,model3)
|
||||
|
||||
ans = [ans1, ans2, ans3]
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "ans"
|
||||
|
||||
|
3
logic/test_cases/q2/atLeastOneCNF.solution
Normal file
3
logic/test_cases/q2/atLeastOneCNF.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/atLeastOneCNF.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "True"
|
20
logic/test_cases/q2/atLeastOneCNF.test
Normal file
20
logic/test_cases/q2/atLeastOneCNF.test
Normal file
@ -0,0 +1,20 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.Expr('A')
|
||||
B = logic.Expr('B')
|
||||
C = logic.Expr('C')
|
||||
D = logic.Expr('D')
|
||||
expr = logicPlan.atLeastOne([A, B, C, D])
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logic.is_valid_cnf(expr)"
|
||||
|
3
logic/test_cases/q2/atLeastOneEff.solution
Normal file
3
logic/test_cases/q2/atLeastOneEff.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/atLeastOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "1"
|
25
logic/test_cases/q2/atLeastOneEff.test
Normal file
25
logic/test_cases/q2/atLeastOneEff.test
Normal file
@ -0,0 +1,25 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
logic.Expr.counter = 0
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
atleast1 = logicPlan.atLeastOne(symbols)
|
||||
num_nodes = logic.Expr.counter
|
||||
|
||||
ans = [num_nodes]
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "ans"
|
3
logic/test_cases/q2/atMostOne.solution
Normal file
3
logic/test_cases/q2/atMostOne.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/atMostOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "True True False"
|
32
logic/test_cases/q2/atMostOne.test
Normal file
32
logic/test_cases/q2/atMostOne.test
Normal file
@ -0,0 +1,32 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
atmost1 = logicPlan.atMostOne(symbols)
|
||||
|
||||
model1 = {A:False, B:False, C:False, D:False}
|
||||
model2 = {A:False, B:True, C:False, D:False}
|
||||
model3 = {A:False, B:True, C:False, D:True}
|
||||
|
||||
ans1 = logic.pl_true(atmost1,model1)
|
||||
ans2 = logic.pl_true(atmost1,model2)
|
||||
ans3 = logic.pl_true(atmost1,model3)
|
||||
|
||||
ans = [ans1, ans2, ans3]
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
test: "ans"
|
||||
|
||||
|
3
logic/test_cases/q2/atMostOneCNF.solution
Normal file
3
logic/test_cases/q2/atMostOneCNF.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/atMostOneCNF.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "True"
|
20
logic/test_cases/q2/atMostOneCNF.test
Normal file
20
logic/test_cases/q2/atMostOneCNF.test
Normal file
@ -0,0 +1,20 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.Expr('A')
|
||||
B = logic.Expr('B')
|
||||
C = logic.Expr('C')
|
||||
D = logic.Expr('D')
|
||||
expr = logicPlan.atMostOne([A, B, C, D])
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logic.is_valid_cnf(expr)"
|
||||
|
4
logic/test_cases/q2/atMostOneEff.solution
Normal file
4
logic/test_cases/q2/atMostOneEff.solution
Normal file
@ -0,0 +1,4 @@
|
||||
# This is the solution file for test_cases/q2/atMostOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "19"
|
||||
result0: "11"
|
26
logic/test_cases/q2/atMostOneEff.test
Normal file
26
logic/test_cases/q2/atMostOneEff.test
Normal file
@ -0,0 +1,26 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
logic.Expr.counter = 0
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
atmost1 = logicPlan.atMostOne(symbols)
|
||||
num_nodes = logic.Expr.counter
|
||||
|
||||
ans = [num_nodes]
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
test: "ans"
|
||||
|
||||
|
3
logic/test_cases/q2/exactlyOne.solution
Normal file
3
logic/test_cases/q2/exactlyOne.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/exactlyOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "False True False"
|
33
logic/test_cases/q2/exactlyOne.test
Normal file
33
logic/test_cases/q2/exactlyOne.test
Normal file
@ -0,0 +1,33 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
exactly1 = logicPlan.exactlyOne(symbols)
|
||||
|
||||
model1 = {A:False, B:False, C:False, D:False}
|
||||
model2 = {A:False, B:True, C:False, D:False}
|
||||
model3 = {A:False, B:True, C:False, D:True}
|
||||
|
||||
ans1 = logic.pl_true(exactly1,model1)
|
||||
ans2 = logic.pl_true(exactly1,model2)
|
||||
ans3 = logic.pl_true(exactly1,model3)
|
||||
|
||||
ans = [ans1, ans2, ans3]
|
||||
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
test: "ans"
|
||||
|
||||
|
3
logic/test_cases/q2/exactlyOneCNF.solution
Normal file
3
logic/test_cases/q2/exactlyOneCNF.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/exactlyOneCNF.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "True"
|
20
logic/test_cases/q2/exactlyOneCNF.test
Normal file
20
logic/test_cases/q2/exactlyOneCNF.test
Normal file
@ -0,0 +1,20 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.Expr('A')
|
||||
B = logic.Expr('B')
|
||||
C = logic.Expr('C')
|
||||
D = logic.Expr('D')
|
||||
expr = logicPlan.exactlyOne([A, B, C, D])
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logic.is_valid_cnf(expr)"
|
||||
|
4
logic/test_cases/q2/exactlyOneEff.solution
Normal file
4
logic/test_cases/q2/exactlyOneEff.solution
Normal file
@ -0,0 +1,4 @@
|
||||
# This is the solution file for test_cases/q2/exactlyOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "21"
|
||||
result0: "13"
|
27
logic/test_cases/q2/exactlyOneEff.test
Normal file
27
logic/test_cases/q2/exactlyOneEff.test
Normal file
@ -0,0 +1,27 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
logic.Expr.counter = 0
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
exactly1 = logicPlan.exactlyOne(symbols)
|
||||
num_nodes = logic.Expr.counter
|
||||
|
||||
ans = [num_nodes]
|
||||
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
test: "ans"
|
||||
|
||||
|
2
logic/test_cases/q3/CONFIG
Normal file
2
logic/test_cases/q3/CONFIG
Normal file
@ -0,0 +1,2 @@
|
||||
class: "PercentPassedQuestion"
|
||||
max_points: "4"
|
3
logic/test_cases/q3/location_satisfiability1.solution
Normal file
3
logic/test_cases/q3/location_satisfiability1.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases\q3\pacphysics_satisfiability3.test.
|
||||
model_not_at_x1_y1_1: "False"
|
||||
model_at_x1_y1_1: "[(East_0, False), (East_1, False), (North_0, True), (North_1, False), (P[0,0]_0, False), (P[0,0]_1, False), (P[0,1]_0, False), (P[0,1]_1, False), (P[0,2]_0, False), (P[0,2]_1, False), (P[0,3]_0, False), (P[0,3]_1, False), (P[1,0]_0, False), (P[1,0]_1, False), (P[1,1]_0, True), (P[1,1]_1, False), (P[1,2]_0, False), (P[1,2]_1, True), (P[1,3]_0, False), (P[1,3]_1, False), (P[2,0]_0, False), (P[2,0]_1, False), (P[2,1]_0, False), (P[2,1]_1, False), (P[2,2]_0, False), (P[2,2]_1, False), (P[2,3]_0, False), (P[2,3]_1, False), (South_0, False), (South_1, True), (WALL[0,0], True), (WALL[0,1], True), (WALL[0,2], True), (WALL[0,3], True), (WALL[1,0], True), (WALL[1,1], False), (WALL[1,2], False), (WALL[1,3], True), (WALL[2,0], True), (WALL[2,1], True), (WALL[2,2], True), (WALL[2,3], True), (West_0, False), (West_1, False)]"
|
14
logic/test_cases/q3/location_satisfiability1.test
Normal file
14
logic/test_cases/q3/location_satisfiability1.test
Normal file
@ -0,0 +1,14 @@
|
||||
class: "LocationSatisfiabilityTest"
|
||||
|
||||
layoutName: "maze1x2"
|
||||
layout: """
|
||||
%%%
|
||||
% %
|
||||
%P%
|
||||
%%%
|
||||
"""
|
||||
|
||||
x0_y0: "(1, 1)"
|
||||
action0: "North"
|
||||
x1_y1: "(1, 2)"
|
||||
action1: "South"
|
3
logic/test_cases/q3/location_satisfiability2.solution
Normal file
3
logic/test_cases/q3/location_satisfiability2.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases\q3\pacphysics_satisfiability4.test.
|
||||
model_not_at_x1_y1_1: "[(East_0, False), (East_1, True), (North_0, False), (North_1, False), (P[0,0]_0, False), (P[0,0]_1, False), (P[0,1]_0, False), (P[0,1]_1, False), (P[0,2]_0, False), (P[0,2]_1, False), (P[0,3]_0, False), (P[0,3]_1, False), (P[0,4]_0, False), (P[0,4]_1, False), (P[1,0]_0, False), (P[1,0]_1, False), (P[1,1]_0, False), (P[1,1]_1, False), (P[1,2]_0, False), (P[1,2]_1, True), (P[1,3]_0, False), (P[1,3]_1, False), (P[1,4]_0, False), (P[1,4]_1, False), (P[2,0]_0, False), (P[2,0]_1, False), (P[2,1]_0, False), (P[2,1]_1, False), (P[2,2]_0, True), (P[2,2]_1, False), (P[2,3]_0, False), (P[2,3]_1, False), (P[2,4]_0, False), (P[2,4]_1, False), (P[3,0]_0, False), (P[3,0]_1, False), (P[3,1]_0, False), (P[3,1]_1, False), (P[3,2]_0, False), (P[3,2]_1, False), (P[3,3]_0, False), (P[3,3]_1, False), (P[3,4]_0, False), (P[3,4]_1, False), (P[4,0]_0, False), (P[4,0]_1, False), (P[4,1]_0, False), (P[4,1]_1, False), (P[4,2]_0, False), (P[4,2]_1, False), (P[4,3]_0, False), (P[4,3]_1, False), (P[4,4]_0, False), (P[4,4]_1, False), (South_0, False), (South_1, False), (WALL[0,0], True), (WALL[0,1], True), (WALL[0,2], True), (WALL[0,3], True), (WALL[0,4], True), (WALL[1,0], True), (WALL[1,1], True), (WALL[1,2], False), (WALL[1,3], True), (WALL[1,4], True), (WALL[2,0], True), (WALL[2,1], False), (WALL[2,2], False), (WALL[2,3], False), (WALL[2,4], True), (WALL[3,0], True), (WALL[3,1], True), (WALL[3,2], False), (WALL[3,3], True), (WALL[3,4], True), (WALL[4,0], True), (WALL[4,1], True), (WALL[4,2], True), (WALL[4,3], True), (WALL[4,4], True), (West_0, True), (West_1, False)]"
|
||||
model_at_x1_y1_1: "False"
|
15
logic/test_cases/q3/location_satisfiability2.test
Normal file
15
logic/test_cases/q3/location_satisfiability2.test
Normal file
@ -0,0 +1,15 @@
|
||||
class: "LocationSatisfiabilityTest"
|
||||
|
||||
layoutName: "maze3x3_5_cross"
|
||||
layout: """
|
||||
%%%%%
|
||||
%% %%
|
||||
% P %
|
||||
%% %%
|
||||
%%%%%
|
||||
"""
|
||||
|
||||
x0_y0: "(2, 2)"
|
||||
action0: "West"
|
||||
x1_y1: "(3, 2)"
|
||||
action1: "East"
|
2
logic/test_cases/q3/pacphysics1.solution
Normal file
2
logic/test_cases/q3/pacphysics1.solution
Normal file
@ -0,0 +1,2 @@
|
||||
# This is the solution file for test_cases\q3\pacphysics_satisfiability1.test.
|
||||
pacphysicsAxioms: "((WALL[0,0] >> ~P[0,0]_0) & (WALL[0,1] >> ~P[0,1]_0) & (WALL[0,2] >> ~P[0,2]_0) & (WALL[0,3] >> ~P[0,3]_0) & (WALL[1,0] >> ~P[1,0]_0) & (WALL[1,1] >> ~P[1,1]_0) & (WALL[1,2] >> ~P[1,2]_0) & (WALL[1,3] >> ~P[1,3]_0) & (WALL[2,0] >> ~P[2,0]_0) & (WALL[2,1] >> ~P[2,1]_0) & (WALL[2,2] >> ~P[2,2]_0) & (WALL[2,3] >> ~P[2,3]_0) & (P[1,1]_0 | P[1,2]_0) & (~P[1,1]_0 | ~P[1,2]_0) & (North_0 | South_0 | East_0 | West_0) & (~North_0 | ~South_0) & (~North_0 | ~East_0) & (~North_0 | ~West_0) & (~South_0 | ~East_0) & (~South_0 | ~West_0) & (~East_0 | ~West_0) & (NORTH_BLOCKED_0 <=> (PWALL[1,1,1,2]_0 | PWALL[1,2,1,3]_0)) & (SOUTH_BLOCKED_0 <=> (PWALL[1,1,1,0]_0 | PWALL[1,2,1,1]_0)) & (EAST_BLOCKED_0 <=> (PWALL[1,1,2,1]_0 | PWALL[1,2,2,2]_0)) & (WEST_BLOCKED_0 <=> (PWALL[1,1,0,1]_0 | PWALL[1,2,0,2]_0)) & (PWALL[1,1,1,2]_0 <=> (P[1,1]_0 & WALL[1,2])) & (PWALL[1,2,1,3]_0 <=> (P[1,2]_0 & WALL[1,3])) & (PWALL[1,1,1,0]_0 <=> (P[1,1]_0 & WALL[1,0])) & (PWALL[1,2,1,1]_0 <=> (P[1,2]_0 & WALL[1,1])) & (PWALL[1,1,2,1]_0 <=> (P[1,1]_0 & WALL[2,1])) & (PWALL[1,2,2,2]_0 <=> (P[1,2]_0 & WALL[2,2])) & (PWALL[1,1,0,1]_0 <=> (P[1,1]_0 & WALL[0,1])) & (PWALL[1,2,0,2]_0 <=> (P[1,2]_0 & WALL[0,2])))"
|
12
logic/test_cases/q3/pacphysics1.test
Normal file
12
logic/test_cases/q3/pacphysics1.test
Normal file
@ -0,0 +1,12 @@
|
||||
class: "PacphysicsTest"
|
||||
|
||||
layoutName: "maze1x2"
|
||||
layout: """
|
||||
%%%
|
||||
% %
|
||||
%P%
|
||||
%%%
|
||||
"""
|
||||
t: "0"
|
||||
|
||||
axiomType: "sensor"
|
2
logic/test_cases/q3/pacphysics2.solution
Normal file
2
logic/test_cases/q3/pacphysics2.solution
Normal file
@ -0,0 +1,2 @@
|
||||
# This is the solution file for test_cases\q3\pacphysics_satisfiability2.test.
|
||||
pacphysicsAxioms: "((WALL[0,0] >> ~P[0,0]_1) & (WALL[0,1] >> ~P[0,1]_1) & (WALL[0,2] >> ~P[0,2]_1) & (WALL[0,3] >> ~P[0,3]_1) & (WALL[1,0] >> ~P[1,0]_1) & (WALL[1,1] >> ~P[1,1]_1) & (WALL[1,2] >> ~P[1,2]_1) & (WALL[1,3] >> ~P[1,3]_1) & (WALL[2,0] >> ~P[2,0]_1) & (WALL[2,1] >> ~P[2,1]_1) & (WALL[2,2] >> ~P[2,2]_1) & (WALL[2,3] >> ~P[2,3]_1) & (WALL[3,0] >> ~P[3,0]_1) & (WALL[3,1] >> ~P[3,1]_1) & (WALL[3,2] >> ~P[3,2]_1) & (WALL[3,3] >> ~P[3,3]_1) & (P[1,1]_1 | P[1,2]_1 | P[2,1]_1 | P[2,2]_1) & (~P[1,1]_1 | ~P[1,2]_1) & (~P[1,1]_1 | ~P[2,1]_1) & (~P[1,1]_1 | ~P[2,2]_1) & (~P[1,2]_1 | ~P[2,1]_1) & (~P[1,2]_1 | ~P[2,2]_1) & (~P[2,1]_1 | ~P[2,2]_1) & (North_1 | South_1 | East_1 | West_1) & (~North_1 | ~South_1) & (~North_1 | ~East_1) & (~North_1 | ~West_1) & (~South_1 | ~East_1) & (~South_1 | ~West_1) & (~East_1 | ~West_1) & (NORTH_BLOCKED_1 <=> (PWALL[1,1,1,2]_1 | PWALL[1,2,1,3]_1 | PWALL[2,1,2,2]_1 | PWALL[2,2,2,3]_1)) & (SOUTH_BLOCKED_1 <=> (PWALL[1,1,1,0]_1 | PWALL[1,2,1,1]_1 | PWALL[2,1,2,0]_1 | PWALL[2,2,2,1]_1)) & (EAST_BLOCKED_1 <=> (PWALL[1,1,2,1]_1 | PWALL[1,2,2,2]_1 | PWALL[2,1,3,1]_1 | PWALL[2,2,3,2]_1)) & (WEST_BLOCKED_1 <=> (PWALL[1,1,0,1]_1 | PWALL[1,2,0,2]_1 | PWALL[2,1,1,1]_1 | PWALL[2,2,1,2]_1)) & (PWALL[1,1,1,2]_1 <=> (P[1,1]_1 & WALL[1,2])) & (PWALL[1,2,1,3]_1 <=> (P[1,2]_1 & WALL[1,3])) & (PWALL[2,1,2,2]_1 <=> (P[2,1]_1 & WALL[2,2])) & (PWALL[2,2,2,3]_1 <=> (P[2,2]_1 & WALL[2,3])) & (PWALL[1,1,1,0]_1 <=> (P[1,1]_1 & WALL[1,0])) & (PWALL[1,2,1,1]_1 <=> (P[1,2]_1 & WALL[1,1])) & (PWALL[2,1,2,0]_1 <=> (P[2,1]_1 & WALL[2,0])) & (PWALL[2,2,2,1]_1 <=> (P[2,2]_1 & WALL[2,1])) & (PWALL[1,1,2,1]_1 <=> (P[1,1]_1 & WALL[2,1])) & (PWALL[1,2,2,2]_1 <=> (P[1,2]_1 & WALL[2,2])) & (PWALL[2,1,3,1]_1 <=> (P[2,1]_1 & WALL[3,1])) & (PWALL[2,2,3,2]_1 <=> (P[2,2]_1 & WALL[3,2])) & (PWALL[1,1,0,1]_1 <=> (P[1,1]_1 & WALL[0,1])) & (PWALL[1,2,0,2]_1 <=> (P[1,2]_1 & WALL[0,2])) & (PWALL[2,1,1,1]_1 <=> (P[2,1]_1 & WALL[1,1])) & (PWALL[2,2,1,2]_1 <=> (P[2,2]_1 & WALL[1,2])) & (GEQ_1_adj_walls_1 <=> (NORTH_BLOCKED_1 | SOUTH_BLOCKED_1 | EAST_BLOCKED_1 | WEST_BLOCKED_1)) & (GEQ_2_adj_walls_1 <=> ((NORTH_BLOCKED_1 & SOUTH_BLOCKED_1) | (NORTH_BLOCKED_1 & EAST_BLOCKED_1) | (NORTH_BLOCKED_1 & WEST_BLOCKED_1) | (SOUTH_BLOCKED_1 & EAST_BLOCKED_1) | (SOUTH_BLOCKED_1 & WEST_BLOCKED_1) | (EAST_BLOCKED_1 & WEST_BLOCKED_1))) & (GEQ_3_adj_walls_1 <=> ((NORTH_BLOCKED_1 & SOUTH_BLOCKED_1 & EAST_BLOCKED_1) | (NORTH_BLOCKED_1 & SOUTH_BLOCKED_1 & WEST_BLOCKED_1) | (NORTH_BLOCKED_1 & EAST_BLOCKED_1 & WEST_BLOCKED_1) | (SOUTH_BLOCKED_1 & EAST_BLOCKED_1 & WEST_BLOCKED_1))) & (P[1,1]_1 <=> ((~P[1,1]_0 & ~WALL[1,1] & ((P[1,2]_0 & South_0) | (P[2,1]_0 & West_0))) | (P[1,1]_0 & (WALLNorth[1,2]_0 | WALLSouth[1,0]_0 | WALLEast[2,1]_0 | WALLWest[0,1]_0)))) & (WALLNorth[1,2]_0 <=> (WALL[1,2] & North_0)) & (WALLSouth[1,0]_0 <=> (WALL[1,0] & South_0)) & (WALLEast[2,1]_0 <=> (WALL[2,1] & East_0)) & (WALLWest[0,1]_0 <=> (WALL[0,1] & West_0)) & (P[1,2]_1 <=> ((~P[1,2]_0 & ~WALL[1,2] & P[2,2]_0 & West_0) | (P[1,2]_0 & (WALLNorth[1,3]_0 | WALLSouth[1,1]_0 | WALLEast[2,2]_0 | WALLWest[0,2]_0)))) & (WALLNorth[1,3]_0 <=> (WALL[1,3] & North_0)) & (WALLSouth[1,1]_0 <=> (WALL[1,1] & South_0)) & (WALLEast[2,2]_0 <=> (WALL[2,2] & East_0)) & (WALLWest[0,2]_0 <=> (WALL[0,2] & West_0)) & (P[2,1]_1 <=> ((~P[2,1]_0 & ~WALL[2,1] & P[2,2]_0 & South_0) | (P[2,1]_0 & (WALLNorth[2,2]_0 | WALLSouth[2,0]_0 | WALLEast[3,1]_0 | WALLWest[1,1]_0)))) & (WALLNorth[2,2]_0 <=> (WALL[2,2] & North_0)) & (WALLSouth[2,0]_0 <=> (WALL[2,0] & South_0)) & (WALLEast[3,1]_0 <=> (WALL[3,1] & East_0)) & (WALLWest[1,1]_0 <=> (WALL[1,1] & West_0)) & (P[2,2]_1 <=> ((~P[2,2]_0 & ~WALL[2,2] & ((P[2,1]_0 & North_0) | (P[1,2]_0 & East_0))) | (P[2,2]_0 & (WALLNorth[2,3]_0 | WALLSouth[2,1]_0 | WALLEast[3,2]_0 | WALLWest[1,2]_0)))) & (WALLNorth[2,3]_0 <=> (WALL[2,3] & North_0)) & (WALLSouth[2,1]_0 <=> (WALL[2,1] & South_0)) & (WALLEast[3,2]_0 <=> (WALL[3,2] & East_0)) & (WALLWest[1,2]_0 <=> (WALL[1,2] & West_0)))"
|
11
logic/test_cases/q3/pacphysics2.test
Normal file
11
logic/test_cases/q3/pacphysics2.test
Normal file
@ -0,0 +1,11 @@
|
||||
class: "PacphysicsTest"
|
||||
|
||||
layoutName: "maze2x2_3"
|
||||
layout: """
|
||||
%%%%
|
||||
% P%
|
||||
%% %
|
||||
%%%%
|
||||
"""
|
||||
t: "1"
|
||||
axiomType: "slam"
|
3
logic/test_cases/q3/pacphysics_transition.solution
Normal file
3
logic/test_cases/q3/pacphysics_transition.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q3/pacphysics_transition.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "(P[1,1]_1 <=> ((P[1,2]_0 & South_0) | (P[1,0]_0 & North_0) | (P[2,1]_0 & West_0) | (P[0,1]_0 & East_0))) (P[1,1]_2 <=> ((P[1,2]_1 & South_1) | (P[1,0]_1 & North_1) | (P[2,1]_1 & West_1) | (P[0,1]_1 & East_1))) (P[1,1]_1 <=> ((P[1,2]_0 & South_0) | (P[2,1]_0 & West_0))) None"
|
23
logic/test_cases/q3/pacphysics_transition.test
Normal file
23
logic/test_cases/q3/pacphysics_transition.test
Normal file
@ -0,0 +1,23 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
from logicPlan import pacmanSuccessorAxiomSingle
|
||||
|
||||
psas = pacmanSuccessorAxiomSingle
|
||||
|
||||
grid1 = [[0]*3]*3 # no walls; note that the three lists are the same reference
|
||||
grid2 = [[1]*4, [1, 0, 0, 1], [1, 0, 1, 1], [1]*4] # 2x2 inside
|
||||
grid3 = [[1]*3]*3 # all walls; note that the three lists are the same reference
|
||||
|
||||
ans = [psas(1, 1, 1, grid1), psas(1, 1, 2, grid1), psas(1, 1, 1, grid2), psas(1, 1, 2, grid3)]
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "ans"
|
||||
|
||||
|
2
logic/test_cases/q4/CONFIG
Normal file
2
logic/test_cases/q4/CONFIG
Normal file
@ -0,0 +1,2 @@
|
||||
class: "PercentPassedQuestion"
|
||||
max_points: "3"
|
4
logic/test_cases/q4/positionLogicPlan1.solution
Normal file
4
logic/test_cases/q4/positionLogicPlan1.solution
Normal file
@ -0,0 +1,4 @@
|
||||
# This is the solution file for test_cases/q4/positionLogicPlan1.test.
|
||||
solution_win: "True"
|
||||
solution_score: "508"
|
||||
solution_path: "West South"
|
11
logic/test_cases/q4/positionLogicPlan1.test
Normal file
11
logic/test_cases/q4/positionLogicPlan1.test
Normal file
@ -0,0 +1,11 @@
|
||||
class: "PositionProblemTest"
|
||||
|
||||
layoutName: "maze2x2"
|
||||
layout: """
|
||||
%%%%
|
||||
% P%
|
||||
%. %
|
||||
%%%%
|
||||
"""
|
||||
|
||||
|
4
logic/test_cases/q4/positionLogicPlan2.solution
Normal file
4
logic/test_cases/q4/positionLogicPlan2.solution
Normal file
@ -0,0 +1,4 @@
|
||||
# This is the solution file for test_cases/q4/positionLogicPlan2.test.
|
||||
solution_win: "True"
|
||||
solution_score: "502"
|
||||
solution_path: "South South West South West West South West"
|
14
logic/test_cases/q4/positionLogicPlan2.test
Normal file
14
logic/test_cases/q4/positionLogicPlan2.test
Normal file
@ -0,0 +1,14 @@
|
||||
class: "PositionProblemTest"
|
||||
|
||||
layoutName: "tinyMaze"
|
||||
layout: """
|
||||
%%%%%%%
|
||||
% P%
|
||||
% %%% %
|
||||
% % %
|
||||
%% %%
|
||||
%. %%%%
|
||||
%%%%%%%
|
||||
"""
|
||||
|
||||
|
4
logic/test_cases/q4/positionLogicPlan3.solution
Normal file
4
logic/test_cases/q4/positionLogicPlan3.solution
Normal file
@ -0,0 +1,4 @@
|
||||
# This is the solution file for test_cases/q4/positionLogicPlan3.test.
|
||||
solution_win: "True"
|
||||
solution_score: "491"
|
||||
solution_path: "East East South South West South South West West South West West West West West West West West West"
|
17
logic/test_cases/q4/positionLogicPlan3.test
Normal file
17
logic/test_cases/q4/positionLogicPlan3.test
Normal file
@ -0,0 +1,17 @@
|
||||
class: "PositionProblemTest"
|
||||
|
||||
layoutName: "smallMaze"
|
||||
layout: """
|
||||
%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %% % % %
|
||||
% %%%%%% % %%%%%% %
|
||||
%%%%%% P % %
|
||||
% % %%%%%% %% %%%%%
|
||||
% %%%% % % %
|
||||
% %%% %%% % %
|
||||
%%%%%%%%%% %%%%%% %
|
||||
%. %% %
|
||||
%%%%%%%%%%%%%%%%%%%%%%
|
||||
"""
|
||||
|
||||
|
2
logic/test_cases/q5/CONFIG
Normal file
2
logic/test_cases/q5/CONFIG
Normal file
@ -0,0 +1,2 @@
|
||||
class: "PercentPassedQuestion"
|
||||
max_points: "3"
|
4
logic/test_cases/q5/foodLogicPlan1.solution
Normal file
4
logic/test_cases/q5/foodLogicPlan1.solution
Normal file
@ -0,0 +1,4 @@
|
||||
# This is the solution file for test_cases/q5/foodLogicPlan1.test.
|
||||
solution_win: "True"
|
||||
solution_score: "513"
|
||||
solution_path: "West East East South South West West East"
|
12
logic/test_cases/q5/foodLogicPlan1.test
Normal file
12
logic/test_cases/q5/foodLogicPlan1.test
Normal file
@ -0,0 +1,12 @@
|
||||
class: "FoodProblemTest"
|
||||
|
||||
layoutName: "testSearch"
|
||||
layout: """
|
||||
%%%%%
|
||||
%.P %
|
||||
%%% %
|
||||
%. %
|
||||
%%%%%
|
||||
"""
|
||||
|
||||
|
4
logic/test_cases/q5/foodLogicPlan2.solution
Normal file
4
logic/test_cases/q5/foodLogicPlan2.solution
Normal file
@ -0,0 +1,4 @@
|
||||
# This is the solution file for test_cases/q5/foodLogicPlan2.test.
|
||||
solution_win: "True"
|
||||
solution_score: "573"
|
||||
solution_path: "South South West East East East East North North North North West West West West West West East East East South South West West West South South West"
|
14
logic/test_cases/q5/foodLogicPlan2.test
Normal file
14
logic/test_cases/q5/foodLogicPlan2.test
Normal file
@ -0,0 +1,14 @@
|
||||
class: "FoodProblemTest"
|
||||
|
||||
layoutName: "tinySearch"
|
||||
layout: """
|
||||
%%%%%%%%%
|
||||
%.. ..%
|
||||
%%%%.%% %
|
||||
% P %
|
||||
%.%% %%.%
|
||||
%.%. .%
|
||||
%%%%%%%%%
|
||||
"""
|
||||
|
||||
|
2
logic/test_cases/q6/CONFIG
Normal file
2
logic/test_cases/q6/CONFIG
Normal file
@ -0,0 +1,2 @@
|
||||
class: "PercentPassedQuestion"
|
||||
max_points: "4"
|
2
logic/test_cases/q6/localizationLogic1.solution
Normal file
2
logic/test_cases/q6/localizationLogic1.solution
Normal file
@ -0,0 +1,2 @@
|
||||
# This is the solution file for test_cases/q6/localizationLogic1.test.
|
||||
possible_locations_per_timestep: "[[(3, 1), (3, 3)], [(2, 3)], [(3, 3)], [(2, 3)], [(2, 2)]]"
|
11
logic/test_cases/q6/localizationLogic1.test
Normal file
11
logic/test_cases/q6/localizationLogic1.test
Normal file
@ -0,0 +1,11 @@
|
||||
class: "LocalizationProblemTest"
|
||||
|
||||
layoutName: "maze3x3_6"
|
||||
layout: """
|
||||
%%%%%
|
||||
%% P%
|
||||
% %%
|
||||
%% %
|
||||
%%%%%
|
||||
"""
|
||||
actions: "['West', 'East', 'West', 'South', 'North']"
|
2
logic/test_cases/q6/localizationLogic2.solution
Normal file
2
logic/test_cases/q6/localizationLogic2.solution
Normal file
@ -0,0 +1,2 @@
|
||||
# This is the solution file for test_cases/q6/localizationLogic2.test.
|
||||
possible_locations_per_timestep: "[[(1, 4), (3, 4)], [(1, 3), (3, 3)], [(1, 2), (3, 2)], [(3, 1)]]"
|
12
logic/test_cases/q6/localizationLogic2.test
Normal file
12
logic/test_cases/q6/localizationLogic2.test
Normal file
@ -0,0 +1,12 @@
|
||||
class: "LocalizationProblemTest"
|
||||
|
||||
layoutName: "maze3x4_9"
|
||||
layout: """
|
||||
%%%%%
|
||||
% %P%
|
||||
% % %
|
||||
% % %
|
||||
% %
|
||||
%%%%%
|
||||
"""
|
||||
actions: "['South', 'South', 'South', 'West']"
|
2
logic/test_cases/q7/CONFIG
Normal file
2
logic/test_cases/q7/CONFIG
Normal file
@ -0,0 +1,2 @@
|
||||
class: "PercentPassedQuestion"
|
||||
max_points: "3"
|
2
logic/test_cases/q7/mappingLogic1.solution
Normal file
2
logic/test_cases/q7/mappingLogic1.solution
Normal file
@ -0,0 +1,2 @@
|
||||
# This is the solution file for test_cases/q7/mappingLogic1.test.
|
||||
known_map_per_timestep: "[[[1, 1, 1, 1, 1], [1, -1, -1, -1, 1], [1, -1, -1, 0, 1], [1, -1, 1, 0, 1], [1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1], [1, -1, -1, 1, 1], [1, -1, 0, 0, 1], [1, -1, 1, 0, 1], [1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1], [1, -1, 0, 1, 1], [1, 0, 0, 0, 1], [1, -1, 1, 0, 1], [1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 0, 0, 0, 1], [1, -1, 1, 0, 1], [1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 0, 0, 0, 1], [1, -1, 1, 0, 1], [1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 0, 0, 0, 1], [1, 0, 1, 0, 1], [1, 1, 1, 1, 1]]]"
|
11
logic/test_cases/q7/mappingLogic1.test
Normal file
11
logic/test_cases/q7/mappingLogic1.test
Normal file
@ -0,0 +1,11 @@
|
||||
class: "MappingProblemTest"
|
||||
|
||||
layoutName: "maze3x3_6"
|
||||
layout: """
|
||||
%%%%%
|
||||
%% P%
|
||||
% %%
|
||||
%% %
|
||||
%%%%%
|
||||
"""
|
||||
actions: "['West', 'South', 'West', 'East', 'South', 'East']"
|
2
logic/test_cases/q7/mappingLogic2.solution
Normal file
2
logic/test_cases/q7/mappingLogic2.solution
Normal file
@ -0,0 +1,2 @@
|
||||
# This is the solution file for test_cases/q7/mappingLogic2.test.
|
||||
known_map_per_timestep: "[[[1, 1, 1, 1, 1, 1], [1, -1, -1, 0, 0, 1], [1, -1, -1, -1, 1, 1], [1, -1, -1, -1, -1, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, -1, 0, 0, 0, 1], [1, -1, -1, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, -1, 0, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 0, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 0, 1, 1, 1], [1, 1, -1, -1, -1, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 0, 1, 1, 1], [1, 1, 0, -1, -1, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 0, 1, 1, 1], [1, 1, 0, 0, -1, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 0, 1, 1, 1], [1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1]]]"
|
12
logic/test_cases/q7/mappingLogic2.test
Normal file
12
logic/test_cases/q7/mappingLogic2.test
Normal file
@ -0,0 +1,12 @@
|
||||
class: "MappingProblemTest"
|
||||
|
||||
layoutName: "maze4x4_10"
|
||||
layout: """
|
||||
%%%%%
|
||||
%P% %
|
||||
% % %
|
||||
% %
|
||||
% %%
|
||||
%%%%%
|
||||
"""
|
||||
actions: "['South', 'South', 'South', 'East', 'North', 'East', 'North', 'North']"
|
2
logic/test_cases/q8/CONFIG
Normal file
2
logic/test_cases/q8/CONFIG
Normal file
@ -0,0 +1,2 @@
|
||||
class: "PercentPassedQuestion"
|
||||
max_points: "4"
|
3
logic/test_cases/q8/SLAMLogic1.solution
Normal file
3
logic/test_cases/q8/SLAMLogic1.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q8/SLAMLogic1.test.
|
||||
known_map_per_timestep: "[[[1, 1, 1, 1, 1], [1, -1, -1, -1, 1], [1, -1, -1, -1, 1], [1, -1, -1, 0, 1], [1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1], [1, -1, -1, -1, 1], [1, -1, -1, 0, 1], [1, -1, 1, 0, 1], [1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1], [1, -1, 0, 1, 1], [1, 0, 0, 0, 1], [1, -1, 1, 0, 1], [1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 0, 0, 0, 1], [1, -1, 1, 0, 1], [1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 0, 0, 0, 1], [1, -1, 1, 0, 1], [1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 0, 0, 0, 1], [1, 0, 1, 0, 1], [1, 1, 1, 1, 1]]]"
|
||||
possible_locations_per_timestep: "[[(3, 3)], [(2, 3)], [(2, 2)], [(1, 2)], [(2, 2)], [(2, 1)]]"
|
11
logic/test_cases/q8/SLAMLogic1.test
Normal file
11
logic/test_cases/q8/SLAMLogic1.test
Normal file
@ -0,0 +1,11 @@
|
||||
class: "SLAMProblemTest"
|
||||
|
||||
layoutName: "maze3x3_6"
|
||||
layout: """
|
||||
%%%%%
|
||||
%% P%
|
||||
% %%
|
||||
%% %
|
||||
%%%%%
|
||||
"""
|
||||
actions: "['West', 'South', 'West', 'East', 'South', 'East']"
|
3
logic/test_cases/q8/SLAMLogic2.solution
Normal file
3
logic/test_cases/q8/SLAMLogic2.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q8/SLAMLogic2.test.
|
||||
known_map_per_timestep: "[[[1, 1, 1, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, 0, 1], [1, -1, -1, 0, 0, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, 0, 1], [1, -1, -1, 0, 0, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, 0, 1], [1, -1, -1, 0, 0, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, 0, 1], [1, -1, -1, 0, 0, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, 0, 1], [1, -1, -1, 0, 0, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, 0, 1], [1, -1, -1, 0, 0, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, 0, 1], [1, -1, -1, 0, 0, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, 0, 1], [1, -1, -1, 0, 0, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, 0, 1], [1, -1, 0, 1, 0, 1], [1, -1, -1, 0, 0, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, -1, -1, -1, -1, 1], [1, -1, -1, -1, 0, 1], [1, -1, 0, 1, 0, 1], [1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1]], [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 0, 1], [1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1]]]"
|
||||
possible_locations_per_timestep: "[[(4, 4)], [(3, 4)], [(2, 4), (3, 4)], [(1, 4), (2, 4), (3, 4)], [(1, 3), (2, 3), (3, 3)], [(1, 2), (2, 2), (2, 3), (3, 3)], [(1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (3, 3)], [(2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (4, 3)], [(3, 1), (3, 2), (4, 2)], [(3, 2), (4, 3)], [(4, 2)]]"
|
12
logic/test_cases/q8/SLAMLogic2.test
Normal file
12
logic/test_cases/q8/SLAMLogic2.test
Normal file
@ -0,0 +1,12 @@
|
||||
class: "SLAMProblemTest"
|
||||
|
||||
layoutName: "maze4x4_13"
|
||||
layout: """
|
||||
%%%%%%
|
||||
% P%
|
||||
% %% %
|
||||
% % %
|
||||
% %
|
||||
%%%%%%
|
||||
"""
|
||||
actions: "['West', 'West', 'West', 'South', 'South', 'South', 'East', 'East', 'North', 'East', 'North']"
|
Reference in New Issue
Block a user