Download presentation
Presentation is loading. Please wait.
Published byMalcolm McBride Modified over 9 years ago
1
Search Strategies: Hi-Lo Game Clif Kussmaul, Muhlenberg College kussmaul@muhlenberg.educspogil.org SIGCSE 2013 Special Session: Engaging Mathematical Reasoning Exercises
2
GOAL: Help novices (CS 0,1,2) see that computer science involves: problem solving mathematical reasoning collaboration evaluating tradeoffs insights from simple examples
3
After completing this activity, learners should be able to: Explain the pros & cons of simple search strategies. Explain common tradeoffs (e.g. complexity and performance). Evaluate simple algorithms (as a function of input size N).
4
Hi-Lo is a number guessing game with simple rules. a.Player A picks a number from 1 to 100. b.Player B guesses a number. c.Player A responds with “you win”, “too high”, or “too low”. d.Players B and A continue to guess & respond until B wins (or gives up).
5
I. Game & Player Strategies 1. Play the game a few times so that everyone understands the rules. 2. Describe 4-5 guessing strategies that Player B could use. List each strategy in column 1 of the worksheet.
6
II. Comparing Strategies 1. In the worksheet, rank each strategy by: a. how quickly it will find the answer b. how easy it is to describe or specify 2. For each, multiply (quick X easy), and add the product to the worksheet. 3. In sentences, describe the relationships between the two sets of rankings.
7
III. Worst & Average Performance 1. For each strategy, determine: a. worst case (maximum) # of guesses needed b. average case (typical) # of guesses needed 2. List 3 reasons why it would be useful to have more precise, quantitative ways to measure and discuss algorithms.
8
IV. Effect of Input Size 1. What is the worst & average # of guesses for each strategy when the range is: a. 1 to 1000 b. 1 to N (optional) 3. In sentences, describe the pros & cons of analyzing performance using input size.
9
Worksheet: Answer Key Player Strategy II.1. Quick II.2. Easy II.3. Prod III.2. Worst III.3. Avg IV.1. iK Worst IV.1. 1K Aver IV.3. N Worst IV.3. N Aver Guess at random, ignore “hi-lo” feedback 428100501K500N N 2 Count up from 1 (or down from 100) 316100501K500N N 2 Count up by 10s, then down by 1s 2362010110 (30) 55 (15) Split range: 50, 25|75, then 12|38|62|88, etc 144761110lg N lg N
10
Explore Invent Apply OrientClose induce deduce The Learning Cycle
11
Discussion kussmaul@muhlenberg.edu moves from simple to complex Qs whole class discussion, teams, individual adapts to various backgrounds & courses can lead to varied homework process-oriented guided inquiry learning http://pogil.orghttp://cspogil.org
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.