Hi All,

Check out PINDOH.com - great new logic puzzle!

9 posts
• Page **1** of **1**

Has something in common with Mastermind. Very enjoyable!

- evert
**Posts:**186**Joined:**26 August 2005

or should we say is exactly the same as "Mastermind".

is just numbers instead of colors.

haven't play that game for decades.

is just numbers instead of colors.

haven't play that game for decades.

- 7b53
- 2012 Supporter
**Posts:**156**Joined:**01 January 2012**Location:**New York

He-he, I coded the Bulls and cows version of this problem in fortran in 1987 and found the best strategy is always to ask for a combination that satisfies all previously collected constraints.

Really enjoyable!

Really enjoyable!

- dobrichev
- 2016 Supporter
**Posts:**1612**Joined:**24 May 2010

Hi, smith22!

Interesting idea - to treat sequence of turns in "Bulls and cows" game as logical puzzle. I don't understand in what way should one treat answers when a turn has repetitive digits. For example, does answer "2" to "3384" turn imply that "3" can be alone right digit (counted twice)?

For dobrichev. Yes, I played "Bulls and cows" in student years. Nice game! I found strategy "always to ask for a combination that satisfies all previously collected constraints" too. It worked well, but I am not sure - is it really best strategy? Thanks for Wikipedia link!

Serg

smith22 wrote:Check out PINDOH.com - great new logic puzzle!

Interesting idea - to treat sequence of turns in "Bulls and cows" game as logical puzzle. I don't understand in what way should one treat answers when a turn has repetitive digits. For example, does answer "2" to "3384" turn imply that "3" can be alone right digit (counted twice)?

For dobrichev. Yes, I played "Bulls and cows" in student years. Nice game! I found strategy "always to ask for a combination that satisfies all previously collected constraints" too. It worked well, but I am not sure - is it really best strategy? Thanks for Wikipedia link!

Serg

- Serg
- 2018 Supporter
**Posts:**606**Joined:**01 June 2010**Location:**Russia

Serg wrote:... is it really best strategy?

I can't prove this in mathematical sense, but there are no much alternative strategies.

There is a broken link to a pdf ("Optimal algorithms for bulls and cows game")in the Wikipedia page. The document from the next link looks far too much essential with my (non-)installed fonts.

Assuming no repetition of digits in queries and the target,

- first query can be always 1234 (due to isomorphism);

- last query (max 7-th) obviously should satisfy constraints.

In between there are max 5 queries with < 1K possibilities each. Someone can attack these < (10^3)^5 = 10^15 approaches. Surely there are more symmetries such as independent order of some of the queries (if not all).

- dobrichev
- 2016 Supporter
**Posts:**1612**Joined:**24 May 2010

Serg wrote:I don't understand in what way should one treat answers when a turn has repetitive digits. For example, does answer "2" to "3384" turn imply that "3" can be alone right digit (counted twice)?

Wikipedia wrote:If there are duplicate colours in the guess, they cannot all be awarded a key peg unless they correspond to the same number of duplicate colours in the hidden code. For example, if the hidden code is white-white-black-black and the player guesses white-white-white-black, the codemaker will award two colored key pegs for the two correct whites, nothing for the third white as there is not a third white in the code, and a colored key peg for the black. No indication is given of the fact that the code also includes a second black.

Source

- evert
**Posts:**186**Joined:**26 August 2005

dobrichev wrote:He-he, I coded the Bulls and cows version of this problem in fortran in 1987 and found the best strategy is always to ask for a combination that satisfies all previously collected constraints.

Really enjoyable!

Is that still the best strategy against a computer program that is allowed to adapt 'the secret key' after each guess? And give feedback as to end up with the largest set of remaining options?

- evert
**Posts:**186**Joined:**26 August 2005

evert wrote:Is that still the best strategy against a computer program that is allowed to adapt 'the secret key' after each guess? And give feedback as to end up with the largest set of remaining options?

I've written a Java applet based on this idea.

- evert
**Posts:**186**Joined:**26 August 2005

9 posts
• Page **1** of **1**