Update README.md
Browse files
README.md
CHANGED
|
@@ -155,9 +155,8 @@ The benchmark uses the following predicates to describe houses and their rooms:
|
|
| 155 |
|
| 156 |
### Prompt:
|
| 157 |
```
|
| 158 |
-
You are a classifier for a logical reasoning task. Each House is composed of one or more Rooms,
|
| 159 |
-
|
| 160 |
-
set of predicates. The label (modern or traditional) of a House is to be determined from its composition.
|
| 161 |
|
| 162 |
To describe the Houses we define a set of predicates and grounding domains:
|
| 163 |
- 'has_room(House, Room)': Room can be room0_1, room0_2, room1_1, room1_2.
|
|
@@ -169,37 +168,50 @@ To describe the Houses we define a set of predicates and grounding domains:
|
|
| 169 |
- 'has_window(Room, Window_type)': Window_type can be bay, casement, sliding, none.
|
| 170 |
- 'window_num(Room, Number_of_windows)': Number_of_windows can be 0, 1, 2, 3, 4.
|
| 171 |
|
| 172 |
-
You are provided with positive and negative examples in the form of modern(t) or traditional(t)
|
| 173 |
-
for each House t, together with background knowledge consisting of ground facts over the above
|
| 174 |
-
predicates which describe its composition.
|
| 175 |
|
| 176 |
modern(house0).
|
| 177 |
has_room(house0, room0_1).
|
| 178 |
room_num(room0_1, 1).
|
| 179 |
-
has_wall_color(room0_1,
|
| 180 |
-
has_roof_type(room0_1,
|
| 181 |
has_garden(room0_1, flower).
|
| 182 |
has_garage(room0_1, none).
|
| 183 |
-
has_window(room0_1,
|
| 184 |
-
window_num(room0_1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
|
| 186 |
traditional(house1).
|
| 187 |
has_room(house1, room1_1).
|
| 188 |
room_num(room1_1, 1).
|
| 189 |
has_wall_color(room1_1, red).
|
| 190 |
has_roof_type(room1_1, flat).
|
| 191 |
-
has_garden(room1_1,
|
| 192 |
-
has_garage(room1_1,
|
| 193 |
-
has_window(room1_1,
|
| 194 |
-
window_num(room1_1,
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
```
|
| 199 |
|
| 200 |
### Solution Example:
|
| 201 |
```prolog
|
| 202 |
-
modern(House)
|
| 203 |
```
|
| 204 |
|
| 205 |
---
|
|
|
|
| 155 |
|
| 156 |
### Prompt:
|
| 157 |
```
|
| 158 |
+
You are a classifier for a logical reasoning task. Each House is composed of one or more Rooms, and each Room is characterized by a set of properties, represented as ground atoms over a fixed set of predicates.
|
| 159 |
+
The label (modern or traditional) of a House is to be determined from its composition.
|
|
|
|
| 160 |
|
| 161 |
To describe the Houses we define a set of predicates and grounding domains:
|
| 162 |
- 'has_room(House, Room)': Room can be room0_1, room0_2, room1_1, room1_2.
|
|
|
|
| 168 |
- 'has_window(Room, Window_type)': Window_type can be bay, casement, sliding, none.
|
| 169 |
- 'window_num(Room, Number_of_windows)': Number_of_windows can be 0, 1, 2, 3, 4.
|
| 170 |
|
| 171 |
+
You are provided with positive and negative examples in the form of modern(t) or traditional(t) for each House t, together with background knowledge consisting of ground facts over the above predicates which describe its composition.
|
|
|
|
|
|
|
| 172 |
|
| 173 |
modern(house0).
|
| 174 |
has_room(house0, room0_1).
|
| 175 |
room_num(room0_1, 1).
|
| 176 |
+
has_wall_color(room0_1, red).
|
| 177 |
+
has_roof_type(room0_1, none).
|
| 178 |
has_garden(room0_1, flower).
|
| 179 |
has_garage(room0_1, none).
|
| 180 |
+
has_window(room0_1, none).
|
| 181 |
+
window_num(room0_1, 0).
|
| 182 |
+
has_room(house0, room0_2).
|
| 183 |
+
room_num(room0_2, 2).
|
| 184 |
+
has_wall_color(room0_2, green).
|
| 185 |
+
has_roof_type(room0_2, gabled).
|
| 186 |
+
has_garden(room0_2, none).
|
| 187 |
+
has_garage(room0_2, attached).
|
| 188 |
+
has_window(room0_2, sliding).
|
| 189 |
+
window_num(room0_2, 1).
|
| 190 |
|
| 191 |
traditional(house1).
|
| 192 |
has_room(house1, room1_1).
|
| 193 |
room_num(room1_1, 1).
|
| 194 |
has_wall_color(room1_1, red).
|
| 195 |
has_roof_type(room1_1, flat).
|
| 196 |
+
has_garden(room1_1, flower).
|
| 197 |
+
has_garage(room1_1, none).
|
| 198 |
+
has_window(room1_1, none).
|
| 199 |
+
window_num(room1_1, 0).
|
| 200 |
+
has_room(house1, room1_2).
|
| 201 |
+
room_num(room1_2, 2).
|
| 202 |
+
has_wall_color(room1_2, green).
|
| 203 |
+
has_roof_type(room1_2, gabled).
|
| 204 |
+
has_garden(room1_2, none).
|
| 205 |
+
has_garage(room1_2, attached).
|
| 206 |
+
has_window(room1_2, sliding).
|
| 207 |
+
window_num(room1_2, 1).
|
| 208 |
+
|
| 209 |
+
Your task is to formulate a hypothesis in form of a prolog rule of the form 'modern(T) :- Body.' that correctly distinguishes modern from traditional Houses. The hypothesis must be true for all positive examples (i.e., Houses labeled as modern) and false for all negative examples (i.e., Houses labeled as traditional). Aim to find the shortest correct rule, that is, one that uses the fewest possible body literals without loss of conditions. Your rule must use only the predicates defined in the grammar above and must perfectly separate modern from traditional Houses.
|
| 210 |
```
|
| 211 |
|
| 212 |
### Solution Example:
|
| 213 |
```prolog
|
| 214 |
+
modern(House):- has_room(House, Room1), has_roof_type(Room1, none).
|
| 215 |
```
|
| 216 |
|
| 217 |
---
|