You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-9Lines changed: 15 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,22 @@
1
-
# Python Reasoning Challenges
1
+
# Python Programming Puzzles
2
+
# (Name Approvers: We would like to rename the repo to Python Programming Puzzles but we can keep it at Python Reasoning Challenges if you prefer)
3
+
4
+
2
5
3
6
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.
4
7
5
-
## What is a python reasoning challenge?
8
+
## What is a python programming puzzle?
6
9
7
-
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`.
10
+
Each puzzle takes the form of a python function that takes an answer as an argument.
11
+
The goal is to find an answer which makes the function return `True`.
12
+
This is called *satisfying* the puzzle, and that is why the puzzles are all named `sat`.
8
13
9
14
```python
10
15
defsat(s: str):
11
16
return s +"world"=="Hello world"
12
17
```
13
18
14
-
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:
19
+
The answer to the above puzzle is the string `"Hello "` because `sat("Hell ")` returns `True`. The puzzles 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:
15
20
16
21
```python
17
22
defsat(moves: List[List[int]], num_disks=8): # moves is list of [from, to] pairs
@@ -23,15 +28,16 @@ def sat(moves: List[List[int]], num_disks=8): # moves is list of [from, to] pai
23
28
24
29
```
25
30
26
-
## Problem sources
31
+
## Puzzle sources
27
32
28
33
The problems in this repo draw inspiration from:
29
-
* Wikipedia articles about algorithms and puzzles
34
+
* Wikipedia articles about [algorithms](https://en.wikipedia.org/wiki/List_of_algorithms), [puzzles](https://en.wikipedia.org/wiki/Category:Logic_puzzles),
35
+
and [math problems](https://en.wikipedia.org/wiki/List_of_unsolved_problems_in_mathematics).
30
36
* The website [codeforces.com](https://codeforces.com), a popular website for programming competition problems
31
37
* The [International Collegiate Programming Contest](https://icpc.global) (ICPC)
32
38
* The [International Mathematical Olympiad](https://en.wikipedia.org/wiki/International_Mathematical_Olympiad) (IMO)
33
39
34
-
# [Click here to browse the challenges](/problems/README.md)
40
+
# [Click here to browse the puzzles](/problems/README.md)
35
41
36
42
## Summary of the dataset
37
43
* Numerous trivial puzzles like `hello world` and reversing a list, useful for learning to program
@@ -49,13 +55,13 @@ The problems in this repo draw inspiration from:
49
55
* International Mathematical Olympiad (IMO) problems
50
56
* International Collegiate Programming Contest (ICPC) problems
51
57
* Competitive programming problems from codeforces.com
52
-
* Graph theory algorithmic challenges
58
+
* Graph theory algorithmic puzzles
53
59
* Shortest path
54
60
* Planted clique (open)
55
61
* Elementary algebra
56
62
* Solving equations
57
63
* Solving quadratic, cubic, and quartic equations
58
-
* Number theory algorithmic challenges:
64
+
* Number theory algorithmic puzzles:
59
65
* Finding common divisors (e.g., using Euclid's algorithm)
60
66
* Factoring numbers (easy for small factors, over $100k in prizes have been awarded and **open**
0 commit comments