Anonymous user
Guess the number/With feedback (player): Difference between revisions
Guess the number/With feedback (player) (view source)
Revision as of 01:32, 15 September 2017
, 6 years agochanged the ;C.f. to ;Related task, added whitespace before the TOC.
m (Pedantic fixes) |
m (changed the ;C.f. to ;Related task, added whitespace before the TOC.) |
||
Line 1:
{{task|Games}}
The task is to write a player for the game that follows the following rules:
:The scorer will choose a number between set limits. The computer player will print a guess of the target number. The computer asks for a score of whether its guess is higher than, lower than, or equal to the target. The computer guesses, and the scorer scores, in turn, until the computer correctly guesses the target number.
Line 5 ⟶ 6:
The computer should guess intelligently based on the accumulated scores given. One way is to use a [[Binary search]] based algorithm.
;Related tasks:
* [[
* *nbsp; [[Bulls and cows/Player]]
<br><br>
=={{header|Ada}}==
|