Brain Game
Record multiple values at the same time in an array and compare values.
Lesson plan
1. Prepare
- Read through the pupil material in the LEGO® Education SPIKE™ App.
2. Engage (5 Min.)
- Use the ideas in the Ignite a Discussion section below to engage your pupils in a discussion relating to this lesson.
- Explain the lesson.
3. Explore (15 Min.)
- Have your pupils work in pairs to build the brain game model.
- Ask them to play the program in order to make sure that their model is working correctly. They should see that the Game Master is indicating the position of the red brick in a stack of bricks.
4. Explain (10 Min.)
- Ask your pupils to program the detection of a second red brick in a second stack of bricks (player 2).
- Make sure that your pupils understand and can explain the concept of an array.
5. Elaborate (15 Min.)
- Explain the memory game challenge and allow some time for your pupils to create their algorithms.
6. Evaluate
- Give feedback on each pupil's performance.
- In order to simplify the process, you can use the assessment rubrics that have been provided.
Ignite a Discussion
Start a discussion about the memory game and the importance of keeping your mind active. Ask relevant questions. Here are some examples:
- Why is it important to keep your mind active?
- What's an array?
- How will an array be used in our memory game?
- How can games improve older people's memories?
Have your pupils watch the video to see what they're about to do.
Building Tips
Partner Build
Split each team's building tasks in order to ensure that everyone is actively involved:
- Pupil A: Game Master’s Head
- Pupil B: Game Master’s Body
Using the Colour Sensor
Find out more about the Colour Sensor in the help section of the SPIKE App.
Brain Game Rules
The goal of this lesson is to create the code for a memory game.
Here are the rules:
- Player 1 feeds a stack of bricks to the Game Master, who records the sequence of colours in an array.
- Player 2 feeds another stack of bricks to the Game Master, who records the sequence of colours in a second array.
- The Game Master program compares the 2 arrays and lights up a pixel on a row to indicate where the colours of the 2 bricks match.
- Player 2 can reorder their bricks again in order to try and match the order of player 1's bricks.
Coding Tips
Main Program
Possible Solution
Other Programs
Differentiation
Simplify this lesson by:
- Explaining the concept of an array by starting with an unplugged activity
- Playing the game using stacks of bricks with only 3 positions (instead of 5) to start with
Take this lesson to the next level by:
- Asking your pupils to improve the game in various ways (e.g. by using more than 3 colours or by changing the way the LED responds to a correct or incorrect colour sequence)
- Adding a function where player 2 only has 5 chances to guess the correct sequence
- Having your pupils explore different theories of ordered lists that are commonly used in computing
Assessment Opportunities
Teacher Observation Checklist
Establish a scale that suits your needs, for example:
- Partially accomplished
- Fully accomplished
- Overachieved
Use the following success criteria to evaluate your pupils' progress:
- The pupils are able to accurately describe the concept of an array.
- The pupils are able to create and use an array in their programs correctly.
- The pupils are able to use multiple arrays in their programs, comparing the value of each index.
Self-Assessment
Have each pupil choose the brick that they feel best represents their performance.
- Blue: I've used an array in my program.
- Yellow: I've created a second array in my program.
- Violet: I'm an array master! I can perform multiple operations on arrays. Give me any array challenge and I'll solve it!
Peer-Assessment
Encourage your pupils to provide feedback to one another by:
- Having one pupil use the coloured brick scale above to score another pupil’s performance
- Asking them to present constructive feedback to one another so that they can improve their group’s performance during the next lesson
Language Arts Extension
To incorporate the development of language arts skills:
- Ask your pupils to prepare a presentation to explain the game, making sure that they correctly use technical terms. For example:
▷ Probability
▷ Mean
▷ Average
▷ Array
▷ Index of an array
Note: This will require additional time.
Maths Extension
To incorporate the development of maths skills:
- Explore various statistics concepts.
▷ Collect bivariate data (e.g. time at which the game was played and the number of trials it took for the pupils to find the right sequence of colours and to investigate the relation between the values).
Note: This will require additional time.
Career Links
The pupils who enjoyed this lesson might be interested in exploring these career pathways:
- Health Science (Allied Health)
- Healthcare Science (Medical and Health Careers)
- Health Science (Medical Assistant)
- Information Technology (Computer Programming)
- Science, Technology, Engineering and Mathematics (Science and Maths)
Teacher Support
The pupils will:
- Explore ways of storing values in an array and use that information for a specific purpose
- Develop their ability to recognise patterns and create effective programs
LEGO® Education SPIKE™ Prime Set
CAS Computing Progression Pathways
Algorithms:
Can identify similarities and differences in situations and can use these to solve problems (pattern recognition). (GE)
Programming and Development:
Selects the appropriate data types. (AL) (AB)
Data and Data Representation:
Distinguishes between data used in a simple program (a variable) and the storage structure for that data. (AB)
Information Technology:
Designs criteria to critically evaluate the quality of solutions, uses the criteria to identify improvements and can make appropriate refinements to the solution. (EV)