Skip to content

Commit eb85d7c

Browse files
committed
WIP: Logic week
1 parent 5e3331b commit eb85d7c

File tree

18 files changed

+538
-20
lines changed

18 files changed

+538
-20
lines changed

Diff for: common-content/en/energisers/binary/index.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
+++
2+
title="Binary Line-Up"
3+
emoji="⬜ ⬛"
4+
time=20
5+
[tasks]
6+
1="Convert decimal to binary using people"
7+
2="Practice quick mental math with powers of 2"
8+
[build]
9+
render = 'never'
10+
list = 'local'
11+
publishResources = false
12+
+++
13+
14+
### ⬜ ⬜ ⬛ ⬜
15+
16+
Let's count in binary using human beans!
17+
18+
Assign roles randomly. 1️⃣ One person will be the **caller**, 4️⃣ four people will be the **beans** and #️⃣ the rest will be the **counters**.
19+
20+
First four **beans**, line up facing away from the group. **Counters**, get in any kind of order so you know who is next.
21+
22+
The **caller** will say a number between 1 and 15.
23+
For example, 8: 😀 ⬜ ⬜ ⬜
24+
25+
First **counter**, you will turn the beans around to represent the binary number. If you get it right, go back in the counter group and let the next person count. If you get it wrong, you must become another bean, and the range of numbers will increase!
26+
27+
<details>
28+
<summary>Example of range increase</summary>
29+
30+
🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧 Round 1: Numbers 1-15 (4 beans)
31+
🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧 Round 2: Numbers 1-31 (5 beans)
32+
🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧 Round 3: Numbers 1-63 (6 beans)
33+
🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧🧑🏽‍🔧 Round 4: Numbers 1-127 (7 beans)
34+
...And so on until only one counter remains!
35+
36+
</details>

Diff for: common-content/en/module/logic/_index.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
+++
2+
title="Logic"
3+
description="Mental models for logical reasoning"
4+
emoji="🧑🏾‍💻"
5+
layout="block-viewer"
6+
hide_from_overview="true"
7+
noindex="true"
8+
+++

Diff for: common-content/en/module/logic/abduction/index.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
+++
2+
title = "Abduction"
3+
time = 60
4+
emoji= "🔎"
5+
[build]
6+
render = 'never'
7+
list = 'local'
8+
publishResources = false
9+
[objectives]
10+
1="Define abduction"
11+
2="Use evidence to reason to the best explanation"
12+
+++
13+
14+
> Abduction is reasoning to the best explanation for all the evidence we observe
15+
16+
```mermaid
17+
flowchart TD
18+
ev1[Evidence 1] --> h1[Hypothesis A]
19+
ev2[Evidence 2] --> h1
20+
ev3[Evidence 3] --> h1
21+
ev1 --> h2[Hypothesis B]
22+
ev2 --> h2
23+
ev3 -.-> h2
24+
h1 --> be[Best Explanation]
25+
h2 -.- be
26+
style h2 stroke-dasharray: 5 5
27+
style ev3 stroke-dasharray: 5 5
28+
```
29+
30+
In [Sherlock Holmes: Consulting Detective](https://www.spacecowboys.fr/case3-the-murderess), we think like detectives. Each case presents us with mysterious evidence that needs explaining. Unlike deduction which proves only what _must_ be true, or induction which only finds patterns that are probably true, abduction seeks the most complete explanation.
31+
32+
> _Given_ a woman was found dead in her apartment
33+
> _And_ her jewelry was untouched
34+
> _And_ there were no signs of forced entry
35+
> _Then_ the killer likely knew the victim (but we can't be certain)
36+
37+
Each lead we follow adds new evidence. A witness statement might support our theory, contradict it, or suggest a completely different explanation. We must:
38+
39+
- Keep track of all evidence
40+
- Form multiple possible theories
41+
- Test each theory against _all_ the evidence
42+
- Choose the explanation that best fits everything we know
43+
- Be ready to revise our theory when new evidence appears
44+
45+
It's quite a lot like problem solving we've done before, isn't it? Now go solve a case:
46+
47+
{{<blocklink
48+
src="https://www.spacecowboys.fr/case3-the-murderess"
49+
name="Sherlock Holmes: Consulting Detective - Case 3"
50+
caption="Use abductive reasoning to best explain the evidence"
51+
time="5" >}}

Diff for: common-content/en/module/logic/binary-logic/index.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
+++
2+
title = "Boolean Logic"
3+
time = 45
4+
emoji = "🎭"
5+
[build]
6+
render = 'never'
7+
list = 'local'
8+
publishResources = false
9+
[objectives]
10+
1="Define binary logic and its role in computing"
11+
2="Express logical statements as truth tables"
12+
+++
13+
14+
> Boolean logic uses only **true** or **false** to reason about the world.
15+
16+
In the real world, we use logic to make decisions all the time. For example: if it's raining and you don't have an umbrella, you will get wet. This can be represented as a truth table:
17+
18+
{{<columns>}}
19+
20+
| Is Raining | Has Umbrella | Is Wet |
21+
| ---------- | ------------ | ------ |
22+
| F | F | F |
23+
| F | T | F |
24+
| T | F | T |
25+
| T | T | F |
26+
27+
Truth tables show all possible combinations and all possible outcomes.
28+
<--->
29+
30+
> _Given_ A is true (1)
31+
> _And_ B is true (1)
32+
> _Then_ A AND B is true (1)
33+
34+
{{</columns>}}
35+
36+
In computers, we use binary logic to derive conclusions from data. Each bit can represent a logical state: {{<tooltip title="true">}}Represented as 1 in binary{{</tooltip>}} or {{<tooltip title="false">}}Represented as 0 in binary{{</tooltip>}}.
37+
38+
| Raining | Umbrella | Wet |
39+
| ------- | -------- | --- |
40+
| 0 | 0 | 0 |
41+
| 0 | 1 | 0 |
42+
| 1 | 0 | 1 |
43+
| 1 | 1 | 0 |
44+
45+
This is fundamental to how computers work. Every operation a computer performs, from simple addition to complex decision-making, ultimately comes down to chains of basic logical operations on 1s and 0s.
46+
47+
Try building some truth tables yourself in your notebook. Here are some examples to get you started:
48+
49+
- "You can get a loyalty reward if you have the app AND have made 10 purchases"
50+
- "The alarm will sound if the door is open OR motion is detected, UNLESS the system is disabled"
51+
- "Trainees pass the course if they complete coursework AND attend class AND complete their steps"
+1
Loading

Diff for: common-content/en/module/logic/bisection/index.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
+++
2+
title = "Bisection"
3+
time = 10
4+
emoji= "✂️"
5+
[build]
6+
render = 'never'
7+
list = 'local'
8+
publishResources = false
9+
[objectives]
10+
1="Define bisection search"
11+
2="Apply binary search to guess a number"
12+
+++
13+
14+
> In bisection, we start with a large problem space and cut it in half with each guess.
15+
16+
![bisection.svg](bisection.svg)
17+
18+
In software development, bisection helps us find exactly when a change occurred. For example:
19+
20+
> _Given_ our code worked last week but not today
21+
> _When_ we test the middle version and it works
22+
> _Then_ the problem must be in the newer half
23+
24+
With each test, we:
25+
26+
1. Select the middle version
27+
2. Test if it works
28+
3. Eliminate half the versions
29+
4. Repeat until we find the exact change
30+
31+
This [binary search](https://www.khanacademy.org/computing/computer-science/algorithms/binary-search/a/binary-search) technique is remarkably efficient. Even with thousands of versions, we'll find the problematic change in just a few tests. Git and other version control systems include [built-in bisect tools](https://git-scm.com/docs/git-bisect) for this purpose.
32+
33+
{{<blocklink
34+
src="https://www.mathsisfun.com/games/guess_number.html"
35+
name="Higher or Lower"
36+
caption="Guess the number efficiently"
37+
time="2" >}}

Diff for: common-content/en/module/logic/deduction/index.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
+++
2+
title = "Deduction"
3+
time = 25
4+
emoji= "🚥"
5+
[build]
6+
render = 'never'
7+
list = 'local'
8+
publishResources = false
9+
[objectives]
10+
1="Define deduction"
11+
2="Use deduction to solve a matrix puzzle"
12+
+++
13+
14+
> Deduction is reasoning from **general** rules to a **specific** conclusion that is _definitely_ true
15+
16+
```mermaid
17+
flowchart LR
18+
d1[Rule 1: If A then B]
19+
d2[Rule 2: We have A]
20+
d1 --> dc[Therefore we must have B]
21+
d2 --> dc
22+
```
23+
24+
In [Murdle](https://murdle.com/), we use deduction to solve murders. Given general rules about the crime scene and specific clues, we can {{<tooltip title="deduce">}}Use rules you know are true to prove something specific _must_ also be true.{{</tooltip>}} who the murderer must be.
25+
26+
> _Given_ the body was found in the kitchen
27+
> _And_ only Miss Saffron had been in the kitchen
28+
> _Then_ Miss Saffron must be the murderer
29+
30+
This is deduction: starting with general rules and arriving at a specific conclusion that must be true. Unlike guessing or inferring patterns, deduction gives us certainty. If our premises are true, our conclusion must be true.
31+
32+
In Murdle, every puzzle can be solved through pure deduction. There's no need to guess. The clues and rules will lead you to a single possible murderer.
33+
34+
Go play Murdle.
35+
36+
{{<blocklink
37+
src="https://murdle.com/"
38+
name="Murdle"
39+
caption="A deductive logic puzzle game"
40+
time="5" >}}

Diff for: common-content/en/module/logic/demo/index.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
+++
2+
title="Docendo Discimus"
3+
emoji="🎤"
4+
time=60
5+
[build]
6+
render = 'never'
7+
list = 'local'
8+
publishResources = false
9+
10+
+++
11+
12+
This sprint you should have prepared to teach one of the following topics:
13+
14+
<details>
15+
<summary>Topics</summary>
16+
17+
- **Deduction**
18+
- **Induction**
19+
- **Abduction**
20+
- **Falsification**
21+
- **The Problem Domain**
22+
- **Bisection**
23+
- **Binary Logic**
24+
</details>
25+
26+
## ⏰ Timekeeper
27+
28+
The timekeeper will keep the groups on track.
29+
30+
## 📚 Instructions
31+
32+
Split into pairs. Each person will have 3 minutes to present their topic. After the lesson, you and your student will discuss the topic for 3 minutes. Then the student will become the teacher and present their own topic.
33+
34+
## 🧑🏾‍🤝‍🧑🏻 Pairs
35+
36+
### 1. Model
37+
38+
You will explain your topic to your student. You will have 3 minutes to communicate, in whatever way you have prepared. You can use a drawing, a game, a conversation, or anything you like that will help you communicate the concept, except a computer!
39+
40+
### 2. Check understanding
41+
42+
After your lesson, you and your student check your understanding for another 3 minutes. Then you will switch roles.
43+
44+
### 3. Add yourself to another group
45+
46+
At the end of both lessons, join another pair. Pick one of your topics and explain it to the other pair. They will do the same for you. At the end of both lessons, join another group of four and repeat the process.
47+
48+
## 💡 Tips:
49+
50+
- **Practice** your lesson before class.
51+
- **Keep it simple**. Just choose one concept to explain.
52+
- **Keep it short**. Three minutes is enough.
+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
+++
2+
title = "Falsification"
3+
time = 45
4+
emoji= ""
5+
[build]
6+
render = 'never'
7+
list = 'local'
8+
publishResources = false
9+
[objectives]
10+
1="Define Popper's falsification principle"
11+
2="Use elimination to reduce possibilities"
12+
+++
13+
14+
> Falsification is an efficient _reduction_ strategy. It means making predictions that **eliminate** possibilities, rather than gathering evidence that supports them
15+
16+
{{<columns>}}
17+
18+
```mermaid
19+
stateDiagram-v2
20+
state "All Possibilities" as AP {
21+
state "Theory Space" as T1 {
22+
state "Remaining" as T2 {
23+
state "Survivors" as T3
24+
}
25+
}
26+
}
27+
```
28+
29+
<--->
30+
31+
> _Given_ many possible rules
32+
> _Make_ a prediction that could eliminate some
33+
> _When_ the prediction fails
34+
> _Then_ we can discard those possibilities
35+
36+
{{</columns>}}
37+
38+
This is a subtle distinction: _dis_ confirmation is the mental model we must build here. In 20 Questions we discovered our problem space by confirming _and_ disconfirming our guesses. In [Zendo](https://www.looneylabs.com/games/zendo), we will try to discover the rule governing pyramid patterns not by _confirming_ our guesses, but by _eliminating_ what's impossible
39+
40+
Here's a [classic example](https://simple.wikipedia.org/wiki/Falsifiability):
41+
42+
```mermaid
43+
flowchart TD
44+
T["🦢 Theory: All Swans Are White"]
45+
O["Observe Next Swan"]
46+
D{"What Color?"}
47+
W["Theory Holds..."]
48+
F["Theory Falsified!"]
49+
50+
T --> O
51+
O --> D
52+
D -->|⬜ White| W
53+
D -->|⬛ Black| F
54+
W -->|"Keep testing"| O
55+
56+
```
57+
58+
Popper explains that each additional white swan appears to confirm our wrong idea that all swans are white. A single black swan disproves it, and ends the loop. This strategy shows us that:
59+
60+
1. Only gathering confirming evidence leaves too many possibilities, or too large a problem domain
61+
2. However, each failed prediction narrows our search space by discarding possibilities
62+
3. We learn _more_ from being wrong than being right
63+
64+
It is more efficient to find a way to disprove your hypothesis or falsify your proposition, if you can. This is because you only need to disprove something once to discard it, but you may apparently verify a hypothesis many times in many different ways and still be wrong.
65+
66+
Now, practice eliminating possibilities in [Zendo](https://www.koryheath.com/zendo/). For this game you need a group, so post in Slack to find others to play with.
67+
68+
{{<blocklink
69+
src="https://www.perlkonig.com/zendo/"
70+
name="Zendo"
71+
caption="Eliminate to learn"
72+
time="20" >}}

0 commit comments

Comments
 (0)