Guess the number/With feedback (player): Difference between revisions

m
changed 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.
 
 
;Cf.
;Related tasks:
* [[Guess the number/With Feedback]]
*   [[BullsGuess andthe cowsnumber/PlayerWith Feedback]]
* *nbsp; [[Bulls and cows/Player]]
<br><br>
 
=={{header|Ada}}==