home *** CD-ROM | disk | FTP | other *** search
-
-
-
- HURKLE
- Version 2.2
- Copyright 1993
-
- CASTLE OAKS COMPUTER SERVICES
- Post Office Box 36082
- Indianapolis, IN 46236-0082
-
-
- Don't read any further if you want to keep playing HURKLE as a game. Or
- perhaps you may want to read on but withhold this information from friends.
-
- Now the truth! HURKLE is not a game! Under the conditions provided, you can
- always win.
-
- It is educational. You can use it to demonstrate and practice the principles
- of a binary search. A binary search is a search in which you narrow the
- search area by one half on each move. It is called a binary search because
- the number 2 is involved. If the number of discrete locations to examine is
- N, then for a K such that 2 raised to the Kth power is greater than N, then
- the binary search can find the solution (object) in K guesses.
-
- In particular, in this version of HURKLE, there are 15 possible hiding places
- in each dimension. Raising 2 to the 4th power gives 16, therefore, you can
- find the hiding place in a minimum of 4 guesses.
-
- How do you do that? You divide and conquer. Always guess 8,8 for the first
- guess. This divides each dimension in half.
-
- Now suppose the hint is to GO SOUTHWEST. This tells you that the HURKLE is
- located someplace between X=1 and X=7, and Y=9 and Y=15. So halve each of
- those giving the next guess as 4,12.
-
- Suppose the next hint is GO SOUTHEAST. This tells you that the HURKLE is
- someplace between X=5 and X=7, and Y=13 and Y=15. Therefore you would find
- the midpoint of these two ranges giving 6,14 as your next guess.
-
- If the next hint is GO NORTHWEST, the only area that has not already been
- eliminated is 5,13. This must be the hiding place.
-
- You may actually hit the hiding spot on fewer guesses, or you may get one of
- the coordinates before the other one. If you ever get a hint of a single
- direction, that means you have already located one coordinate of the hiding
- place.
-
- Is this fun? Or did I spoil it by making it too academic for you?
-
- Now if you really want to cheat, read HURKLE3.DOC.