Skip to content

Commit c998f95

Browse files
authored
Update README.md
1 parent 242b3af commit c998f95

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1-
# Project
1+
## Python Reasoning Challenges
22

3-
> This repo has been populated by an initial template to help get you started. Please
4-
> make sure to update the content to build a great experience for community-building.
3+
This repo contains a dataset of python reasoning challenges which can be used to teach an AI python and evaluate an AI's ability to understand and write python programs. Each challenge takes the form of a python function that takes an answer as an argument. The goal is to find an answer which makes the function return `True`.
54

6-
As the maintainer of this project, please make a few updates:
5+
```python
6+
def sat(s: str):
7+
return s + "world" == "Hello world"
8+
```
9+
10+
The answer to the above challenge is the string `"Hello "` because `sat("Hell ")` returns `True`. The challenges range from trivial problems like this, to classic puzzles, to algorithms problems and problems from the [International Mathematical Olympiad](https://en.wikipedia.org/wiki/International_Mathematical_Olympiad) and open problems in mathematics. For instance, the classic [Towers of Hanoi](https://en.wikipedia.org/wiki/Tower_of_Hanoi) puzzle can be written as follows:
11+
12+
```python
13+
def sat(moves: List[List[int]], num_disks=8): # moves is list of [from, to] pairs
14+
state = (list(range(num_disks)), [], [])
15+
for [i, j] in moves:
16+
state[j].append(state[i].pop())
17+
assert state[j] == sorted(state[j]), "larger disk on top of smaller disk"
18+
return state[0] == state[1] == []
19+
20+
```
721

8-
- Improving this README.MD file to provide a great experience
9-
- Updating SUPPORT.MD with content about this project's support experience
10-
- Understanding the security reporting process in SECURITY.MD
11-
- Remove this section from the README
1222

1323
## Contributing
1424

0 commit comments

Comments
 (0)