110 likes | 201 Views
Search Strategies: Hi-Lo Game. Clif Kussmaul, Muhlenberg College kussmaul@muhlenberg.edu cspogil.org SIGCSE 2013 Special Session: Engaging Mathematical Reasoning Exercises. GOAL: Help novices (CS 0,1,2) see that computer science involves:. problem solving mathematical reasoning
E N D
Search Strategies: Hi-Lo Game Clif Kussmaul, Muhlenberg College kussmaul@muhlenberg.edu cspogil.org SIGCSE 2013 Special Session: Engaging Mathematical Reasoning Exercises
GOAL: Help novices (CS 0,1,2) see that computer science involves: • problem solving • mathematical reasoning • collaboration • evaluating tradeoffs • insights from simple examples
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).
Hi-Lo is a number guessing game with simple rules. • Player A picks a number from 1 to 100. • Player B guesses a number. • Player A responds with “you win”,“too high”, or “too low”. • Players B and A continue to guess & respond until B wins (or gives up).
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.
II. Comparing Strategies 1. In the worksheet, rank each strategy by: a. howquickly it will find the answer b. howeasy 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.
III. Worst & Average Performance 1. For each strategy, determine: a. worst case (maximum) # of guesses needed b. averagecase (typical) # of guesses needed 2. List 3 reasons why it would be useful to have more precise, quantitative ways to measure and discuss algorithms.
IV. Effect of Input Size 1. What is the worst & average # of guessesfor 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.
The Learning Cycle induce deduce Invent Explore Apply Orient Close
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.org http://cspogil.org