46
C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: [email protected] homepage: www.cs.aue.auc.dk/~av June 2005

C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: [email protected] homepage: av

Embed Size (px)

Citation preview

Page 1: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

C-cards Starter KitAll you need is here!

c-cardsdev.sf.net

Andrea Valente

Aalborg University in Esbjerg - DK

email: [email protected]

homepage: www.cs.aue.auc.dk/~av

June 2005

Page 2: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

What are c-cards?

• Computational cards are a graphic formalism to express simple computational systems.

• The central idea of the c-cards project is that, introducing children very early (8 to 10 year-old) to the concept of computing machine, simplifies the later learning and understanding of technology-related subjects.

• C-cards mix ideas from tabletop games and puzzles, with cards acting as computational elements; computing machines can be defined, physically built and animated by disposing cards on a table, and moving objectified symbols on top of them, following formal rules.

• C-cards are designed to be easy to reify, therefore they are suitable of being implemented in very many supports, including playing cards, tiles, as well as existing toys, and software simulations.

Page 3: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

The deck• A computational card is as a square piece of paper, with a port on each of its

four sides.

• There are 8 types of cards, and together they form the a basic deck (below):

– the peg-source card and the peg-pit card (first row),

– the cross card, the east and west turn cards and the confluence card (second row),

– then the switch and the random (last row, from left to right).

– The 4 small puppets at the far right on the first row are pegs

To create your deck, just print the 3 following pages!

(or draw the 8 card types yourself)

Page 4: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av
Page 5: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av
Page 6: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av
Page 7: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Rules

• To play a game at c-cards, you need to print some copies of the deck, then cut free your cards and some pegs.

• At this point you are ready to compose a card circuit, by connecting cards together

• To execute a computation, a number of pegs will be placed on the source cards of a circuit, then you will move them, one at the time, to represent the flow of information traversing the circuit

• Pegs will run through the cards following the arrows, from port to port, until they land on a pit card, where they must stop

The rules for each type of card are explained in the following pages

Page 8: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

. . .

Source rule Pit rule

Cross rule

Page 9: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Switch rule2Switch rule1

Random rule

Page 10: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Rules explained

Note that the cross, east and west turn, and the confluence card work as pipes, for the pegs to pass through

The switch card is special: it is the only double-faced card in the deck. After cutting it, you have to fold it along the thick vertical line. Switch cards can change state dynamically:

– a switch card is placed in the circuit with its initial face upward, so that the first peg arriving from north will exit westwards; when leaving the card, the peg will force the card to flip on its other face.

– The switch card will then be flipped in its other state (face), so that a second peg arriving from north will exit eastwards. And the card will flip back to its initial face.

...

NorthWest East

South

Page 11: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Rules explained (cont.)

The random card is the non-deterministic version of the switch. A peg entering a random card from north, will be sent out towards east or west (with {1/2,1/2} probability distribution). To decide you will have to toss a coin: head -> the peg goes east, tail -> west.

Note that you don't need to talk about probability with the class: discussing frequency (i.e. successful attempts divided by number of trials) will be more than enough to work and understand the randomness present in the c-cards.

Moreover 8 to 10 year-old usually know about fractions, so they should be able to deal with frequencies.

NorthWest East

South

Page 12: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

A simple example

Page 13: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av
Page 14: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

As you can see from this example, source cards are inputs of the circuit, while pit cards are outputs.

Page 15: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Exercises• When designing a course based on c-cards, we propose to

consider:– at the beginning of the course show some simple static

circuits and animate them (with pegs), so to explain the behaviour of all types of cards through direct manipulation. This strategy conforms to the spiral and early bird pedagogical patterns, and represents a bottom-up phase in the learning process. In this way students can concentrate on designing and testing their own computing machines.

– After this hands-on introduction, some top-down modeling examples should be shown: a shape, i.e. the specification of a circuit’s desired behavior, is proposed to the class, and the exercise is to implement it as a card-circuit.

...

Page 16: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Exercises (cont.)

• Moreover, all elements employed in build these circuits are downloaded, printed and have to be cut (and folded in some cases) before use.

• So children are physically involved in the construction of their own educational tools, and if needed they can also extend it in a straightforward way, just by drawing new cards on a piece of paper.

In the following pages you will find, for each exercise:

– a textual description,

– a visual definition of the problem (a shape)

– and a possible solution

Page 17: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Good/Bad

(?) Can you design and build a card-circuit that behaves like this:

– when the first (good) peg comes from the source-card labelled Earth, it goes towards the pit-card labelled Paradise, then

– when the second peg (bad) comes from Earth, it goes to Hell

– and the next (that will be a good) peg, should go to Paradise, like the first, then Hell, and so on...

Page 18: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Good/Bad

Paradise Hell

Earth

Page 19: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

A L

ITT

LE

HE

LP

Page 20: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

SO

LU

TIO

N

Page 21: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

The school-bus

My House Your HouseTheir house

meyou

twins

Page 22: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

The school-bus

• You have to build a circuit that shows the behavior of a special school-bus.

• This bus has to bring home 4 passengers (me, you, and two twins) at their houses...

• But the passengers always come in a strange order: first me, then one of the twins, then you, and the other twin.

• Therefore the bus has to visit all the houses in the correct order

Page 23: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Bus

Myhouse

Your house

Theirhouse

Myhouse

Your house

Theirhouse

Page 24: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

My House Your House

1st

Their house

2nd 4th

3rd

...

1nd 3th

A L

ITT

LE

HE

LP

Page 25: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

SO

LU

TIO

N...

My House Your House Their house

Bus

Page 26: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Good OR Bad ?

Things aren't always perfect...

Sometimes a good peg can end up in hell and a bad one can reach paradise!

(?) Can you design and build a card-circuit that behaves like this:

– when a peg comes from the source-card labelled Earth, it has 1 chance out of 2 to go towards the pit-card labelled Paradise and 1 chance out of 2 to go the one labelled Hell

Page 27: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Good/Bad ?

? ?Paradise Hell

Earth

Page 28: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

SO

LU

TIO

N

? ?

Page 29: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Not always paradise...

• Someone installed a weird computerized gate with the task of sorting people and direct them to hell or paradise.

• The gate works in this way: – each person has 1 chance out of 4 to get into hell

• Can you design and implement a circuit that emulates the new gate?

Page 30: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Not always Paradise!

Paradise Hell

Earth

? ?

Page 31: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

? ?

SO

LU

TIO

N

Page 32: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Split #1

Split #2

3 out of 4end up here 1 out

of 4

EX

PL

AN

AT

ION

Page 33: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

A crazy kind of bus...

• Our school-bus has a problem!

• It should work as in the previous exercise, but instead you and me sometimes get delivered at the wrong house...

• The (lucky) twins instead are brought home without any confusion.

• Can you re-design your bus-circuit to take into account the new situation?

Page 34: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

? ?

Crazy Bus

Myhouse

Your house

Theirhouse

Myhouse

Your house

Theirhouse ?

Page 35: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

SO

LU

TIO

N...

My House Your House Their house

Bus

Page 36: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

The perfect coffee machine... or perhaps a candy machine

• You should now build a circuit representing a machine that sells beverages: tea and coffee

• Pressing the coffee button is represented by placing a peg in the corresponding source card (see next page)

• Each time the coffee button is pressed, the peg should end up in the pit labelled coffee delivered. The same for the tea.

• The machine should never deliver the wrong the beverage

Page 37: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Coffeebutton

Coffee delivered

Teabutton

Bev

erag

e M

achi

ne

Tea delivered

Page 38: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

SO

LU

TIO

NCoffeebutton

Teabutton

Coffeedelivered

Teadelivered

Page 39: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

But errors may occur...

• The machine is the same as in the previous exercise, but this time it does make mistakes!

• In 1 case out of 4 the customer will get the wrong beverage...

• Design a circuit that implements this machine

Note for the teacher

– this is an example of binary symmetric channels, as discussed by Shannon in his information transmission theory

– repeating the signal can improve the communication: try and suggest it to your class

Page 40: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Coffeebutton

Coffee delivered

Teabutton

Ran

dom

Bev

erag

e M

achi

ne

Tea delivered? ?

Page 41: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

SO

LU

TIO

NCoffeebutton

Teabutton

Coffeedelivered

Teadelivered

Page 42: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

A fairy tales machine

• C-cards can be used also outside Computer Science.

• In the story-telling domain, for example, a fairy tale can be constructed, bottom-up, from a set of elementary actions or situations. So from a formal language point of view, a story is more or less a string, and we can design a card circuit to act as a story-generator.

• In this exercise, students have to use random cards to define a probabilistic machine that will produce one in a set of possible stories (see the shape, next page).

• If this story-machine responds to a few inputs, students can also explore and design non-linear narrative. In the RPG community for instance, there are many examples of game-books or interactive-books, where text is decomposed into short fragments and the reader/player traverses the book depending on her choices, character parameters and score. There are usually multiple ways to navigate through the same book, which result in a different personal experience for each player.

Page 43: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

Once there was a _____ who was riding a _________But was eaten by the ogre.

PIG BROOM

Example

Page 44: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

pig boy princess witch prince

pig broom horse

who was riding a

Once there was a

But was eatenby the ogre.

... into the sunset!

SO

LU

TIO

N

Page 45: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

A fairy tales machinenotes

• The solution (previous page) is not finished, but it is easy to complete it.

• The proposed way of working (by dividing a large problem in sub-problems) is typical of programming and other problem-solving activities

• Note that the probability distribution of the words pig, boy, princess, witch and prince in the first circuit can be changed by re-arranging the random cards. In the proposed solution it is:

{1/8 , 1/4 , 1/4 , 1/4 , 1/8 }

So it is twice more frequent a witch than a prince!

Page 46: C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK email: av@cs.aue.auc.dk homepage: av

For more ideas...

Please check the website

c-cardsdev.sf.net

where you will find:

– a complete set of exercises for a Computer Science course, at elementary school level

– an editor/simulator (implemented in JavaScript)

– ideas for the deployment of c-cards

– ... ;)