fix: a star in docs
This commit is contained in:
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"
|
||||
|
||||
|
Reference in New Issue
Block a user