I think you really get the most pleasing message sequence when using techniques from Loops/N plus one half, except that instead of a fixed limit, you have a dynamic one. –Donal Fellows 21:15, 28 October 2010 (UTC)

dupe? (sort of)

I think this task is already covered in Bulls and Cows, but with more functionality. Could this be a dupe? --Mwn3d 21:26, 28 October 2010 (UTC)

They might have some similarity, but no more than say Go and Gomoku. This game might well be an exercise for people without the ability to play the more difficult B&C. It might also serve as a useful programming problem for those new to programming. --Paddy3118 16:17, 29 October 2010 (UTC)

How about a modification to turn it into more of a game?

The computer could give the bounds, select a target, ask for a guess, but then tell .... I see a new task coming on: Guess the number/With Feedback  :-)
--Paddy3118 06:02, 29 October 2010 (UTC)

I am a great believer in the KISS principle. I think more complicated examples should be kept separate. The idea of rosetta code (according to the front page) is to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learning another.

I think the examples should be short and simple just for the purposes of illustrating specific differences. It might be an idea to have a "see also" section that links to larger more complex examples of course. I think the idea of creating a separate task is a good idea. For this reason, I think that "Bulls and Cows", "Guess the Number" and "Guess the number (with feedback)" should be considered to be three separate tasks.

These are my own opinions of course. :)

Markhobley 19:59, 29 October 2010 (UTC)

Language

Suggest removing the explicit invokation of 'conditional loop', as some languages' syntax don't use that syntax. (I'm thinking of logic languages and, I think, functional languages.) A more precise description might be, "The program randomly chooses a number [1-10]. The program then keeps asking the user to guess what that number is until the user inputs that number as their guess." --Michael Mol 14:32, 29 October 2010 (UTC)

Well, I think we could keep the wording, but just state in the examples that the language does not use conditional loops and state how these are emulated. so at least we have a task for conditional loops.

Failing that we could split the task. For example: Guess the number (using conditional loops) and Guess the number (using the blah blah blah method), etc.

Markhobley 14:40, 29 October 2010 (UTC)

I don't think that split would be good. It would be better to allow more freedom in this task and have the example writers specify what constructs they go with. This isn't an algorithm-centric task, so we should focus on the functionality (which I still think is too similar to Bulls and Cows--see above). --Mwn3d 16:02, 29 October 2010 (UTC)
Return to "Guess the number" page.