NCompass Live: Board Games & Computer Science in Libraries

nebraskaccess 77 views 51 slides Sep 05, 2024
Slide 1
Slide 1 of 51
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51

About This Presentation

NCompass Live - September 4, 2024
http://nlc.nebraska.gov/ncompasslive/

Hall looks at using tabletop games to teach computer science. While programming can seem abstract and confusing, board games provide an excellent, tangible parallel for how it works. In the current golden age of tabletop gaming...


Slide Content

Board Games & Computer Science in Libraries By Stephen Hall Computer Science & Engineering Librarian University of Pennsylvania

Overview Two things are happening simultaneously: Technical literacy is becoming a key part of overall information literacy A “Golden Age of Board Games” (ca. 1995-now) 2.1. Libraries are collecting games as loanable materials

Overview Board games provide an amazing framework for teaching computer science, and libraries are uniquely well positioned to use them as educational tools.

Concepts of Computer Science Computers function using a number of logic and data structures/operations, including: Booleans Conditionals Loops Comparison operators Variables/counting variables Pseudo-random number generation

Booleans True/False statements “It is raining outside.” True/False

Booleans True/False statements is_raining = True is_sunny = False

Conditionals If/Else statements “If you’re making oatmeal cookies, add raisins. Otherwise, add chocolate chips.”

Conditionals If/Else statements nut_allergy = True if nut_allergy == True: print ( "Don’t add nuts to the cookies" ) else : print ( "Add nuts to the cookies." )

Loops Iterating statements “For every dozen cookies you are making, add another set of ingredients.” “While batter is not thoroughly mixed, continue mixing.”

Loops Iterating statements aliens = [ "daleks" , " cylons " , " borg " , "cybermen" ] for alien in aliens: if alien[0] == "c" : print (alien) cylons cybermen

Comparison operators <, >, =, etc. Rory ate 5 cookies. Oliver ate 3 cookies. True False False rory_cookies > oliver_cookies rory_cookies < oliver_cookies rory_cookies == oliver_cookies

Variables/counting variables Incrementing/decrementing values We have no cookies. (c = 0) I make a dozen. (c = 12) You eat 2. (c = 10) I make another dozen. (c = 22) You eat 4. (c = 18)

Variables/counting variables Incrementing/decrementing values x = 1 x += 3 print (x) x -= 2 print (x) 2 4

Pseudo-random number generation “Pick a number” “Draw a marble from a bag of assorted marbles.”

Pseudo-random number generation “Pick a number” import random print ( random.randint (1,11)) print ( random.randint (1,101)) print ( random.randint (1,1001)) 4 84 231

Continuous vs. Discrete Mathematics Continuous Mathematics – Between any two numbers, there are an infinite number of other numbers. Discrete Mathematics – Built on finite sets. Between any two points are a known, fixed number of other points.

Continuous vs. Discrete Mathematics Continuous Mathematics – “Measured” You can buy 1.35 pounds of apples… Discrete Mathematics – “Counted” …but you can’t buy 1.35 cars.

Board Games are Discrete Ticket to Ride: Nordic Countries , Days of Wonder , 2007

Board Games are Discrete Santorini , Roxley , 2016

Board Games are Discrete Orchard , Side Room Games , 2018

Board games are built on the same principles as computer programs. Even if you have never touched a programming environment, you have almost certainly interacted with programming concepts in a game.

When playing a game, a player’s job is to examine the options before them—a finite number of options—and choose the best one.

Side-By-Side CS Principle Board Game Equivalent Example Random number generation

Side-By-Side CS Principle Board Game Equivalent Example Random number generation Rolling a die, drawing a card, spinning a spinner

Side-By-Side CS Principle Board Game Equivalent Example Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables

Side-By-Side CS Principle Board Game Equivalent Example Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Conditionals Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Conditionals If you roll 4+, the attack hits. Otherwise, the attack misses. Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Loops Conditionals If you roll 4+, the attack hits. Otherwise, the attack misses. Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Loops While all scores are below 10, continue playing. (Game loop) Conditionals If you roll 4+, the attack hits. Otherwise, the attack misses. Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Booleans Loops While all scores are below 10, continue playing. (Game loop) Conditionals If you roll 4+, the attack hits. Otherwise, the attack misses. Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Booleans Game states (player has a settlement in Catan , stone is surrounded in Go , worker space is available in Agricola ) Loops While all scores are below 10, continue playing. (Game loop) Conditionals If you roll 4+, the attack hits. Otherwise, the attack misses. Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Objects/Classes/Instances Booleans Game states (player has a settlement in Catan , stone is surrounded in Go , worker space is available in Agricola ) Loops While all scores are below 10, continue playing. (Game loop) Conditionals If you roll 4+, the attack hits. Otherwise, the attack misses. Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Objects/Classes/Instances Player A, Player B, Player C, etc. Booleans Game states (player has a settlement in Catan , stone is surrounded in Go , worker space is available in Agricola ) Loops While all scores are below 10, continue playing. (Game loop) Conditionals If you roll 4+, the attack hits. Otherwise, the attack misses. Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Program code Objects/Classes/Instances Player A, Player B, Player C, etc. Booleans Game states (player has a settlement in Catan , stone is surrounded in Go , worker space is available in Agricola ) Loops While all scores are below 10, continue playing. (Game loop) Conditionals If you roll 4+, the attack hits. Otherwise, the attack misses. Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Program code Rulebook Objects/Classes/Instances Player A, Player B, Player C, etc. Booleans Game states (player has a settlement in Catan , stone is surrounded in Go , worker space is available in Agricola ) Loops While all scores are below 10, continue playing. (Game loop) Conditionals If you roll 4+, the attack hits. Otherwise, the attack misses. Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Executing program Program code Rulebook Objects/Classes/Instances Player A, Player B, Player C, etc. Booleans Game states (player has a settlement in Catan , stone is surrounded in Go , worker space is available in Agricola ) Loops While all scores are below 10, continue playing. (Game loop) Conditionals If you roll 4+, the attack hits. Otherwise, the attack misses. Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Side-By-Side CS Principle Board Game Equivalent Example Executing program Playing the game Program code Rulebook Objects/Classes/Instances Player A, Player B, Player C, etc. Booleans Game states (player has a settlement in Catan , stone is surrounded in Go , worker space is available in Agricola ) Loops While all scores are below 10, continue playing. (Game loop) Conditionals If you roll 4+, the attack hits. Otherwise, the attack misses. Random number generation Rolling a die, drawing a card, spinning a spinner Variables/counting variables Player scores, influence tracks, hit points

Deep Blue vs. Garry Kasparov, 1996-1997. Kasparov wins first match, Deep Blue wins rematch. AlphaGo vs. Lee Sedol, 2016. AlphaGo wins 4 of 5 games.

“While” loop ( Arkham Horror , Fantasy Flight Games, 2005) While a race is in progress—and before “No more bets!” is called or a horse reaches the finish line—players may place each of their Bet Tokens… ( Ready Set Bet , AEG, 2022)

“For” loop For each of the 4 Resource districts in the Osiris action area, count how many game pieces each player has. The player with the most in that district scores 3 Victory Points. ( Tekhenu : Obelisk of the Sun , Board&Dice , 2020)

Conditional ( Arkham Horror , Fantasy Flight Games, 2005) If the investigator passes the Combat check, he defeats the monster… If the investigator fails the check, the monster deals its combat damage to him.

Comparison statement ( Arkham Horror , Fantasy Flight Games, 2005) Roll a number of dice equal to your Might. Your opponent does the same. Whoever rolls a higher result inflicts physical damage to the other explorer or monster. ( Betrayal at House on the Hill , Avalon Hill, 2010)

Incrementing variable Increase your power by 2 on the Power Track. ( Scythe , Stonemaier Games, 2016)

Boolean statement A player is eliminated if both of the following conditions are true: None of his units are on the board He does not have enough rubium to purchase more units ( Nexus Ops , Fantasy Flight Games, 2012)

Recommendations STEM Principle Board Game Recommendations Deduction Sleuth , Turing Machine , The Lost Code Combinatorics Patchwork , Hive , Go , Santorini , Onitama Set Theory Set , Tobago, On-Sets, Dinosaur Tea Party Probability Can’t Stop , Incan Gold , The Quacks of Quedlinburg Programming Turing Tumble , Robot Turtles , RoboRally Engineering Spintronics, Suspend, Gizmos Biology Genotype , Cytosis , Wingspan , Evolution

Discussion Where else do computer science principles appear in board games?

Stephen Hall [email protected]