milestone 1 progress report

This commit is contained in:
Kaushik Narayan R 2024-11-17 23:58:39 -07:00
parent 261434ced3
commit 87266a512b
5 changed files with 25 additions and 0 deletions

Binary file not shown.

BIN
Milestone - 1.docx Normal file

Binary file not shown.

BIN
Milestone - 1.pdf Normal file

Binary file not shown.

25
draft_hcp.asp Normal file
View File

@ -0,0 +1,25 @@
% each thing must be placed in exactly one cabinet
1 { cabinetTOthing(C, T) : cabinetDomain(C) } 1 :- thing(T).
% no cabinet should contain more than 5 things
:- 6 {cabinetTOthing(C, T) : thing(T)}, cabinetDomain(C).
% each cabinet must be placed in exactly one room
1 { roomTOcabinet(R, C) : room(R) } 1 :- cabinetDomain(C).
% a room can hold at most 4 cabinets
:- 5 {roomTOcabinet(R, C) : cabinetDomain(C)}, room(R).
% only one owner per room
personTOroom(P, R) :- personTOthing(P, T), cabinetTOthing(C, T), roomTOcabinet(R, C).
% one room per person
:- personTOroom(P1, R), personTOroom(P2, R), P1 != P2.
% things of one person cannot be placed in a cabinet together with things of another person
:- cabinetTOthing(X,Y1), cabinetTOthing(X,Y2), personTOthing(P1,Y1), personTOthing(P2,Y2), P1!= P2.
#show cabinetTOthing/2.
#show roomTOcabinet/2.
#show cabinet/1.
#show room/1.