I wrote a python program to solve this game

Forum rules
Please DO NOT POST BUGS on this forum. Please report (and vote) bugs on : https://boardgamearena.com/bugs
Post Reply
User avatar
kingdedede745
Posts: 17
Joined: 25 June 2022, 04:18

I wrote a python program to solve this game

Post by kingdedede745 »

https://imgur.com/a/etUeH2T

You enter any number of questions and answers, then type "solve" and it will calculate the possible codes remaining, and tell you the best question or questions to ask next. You can then continue to enter questions and answers, and solving.

It calculates the best question to ask by choosing the question that eliminates the most possibilities in the worst case.

Fun fact: the best first question to ask is to ask about columns A, B, D, E, G, or H. From what I've seen, the first several questions you should ask are about columns.

Feel free to use it however you wish. Just don't use it to cheat in multiplayer. (I didn't program the multiplayer rule that says you have to ask each type of question once before you can ask anything you want. I don't even know if BGA enforces that rule as I've only played this game solo.)

https://github.com/kingddd3/DigitCode_Solver/tree/main
User avatar
goldensmith
Posts: 35
Joined: 17 December 2021, 05:40

Re: I wrote a python program to solve this game

Post by goldensmith »

Congrats but why? I get that my brain uses an algorithm to process possibilities. But running a program, doesn’t that take the fun out of the game?
User avatar
kingdedede745
Posts: 17
Joined: 25 June 2022, 04:18

Re: I wrote a python program to solve this game

Post by kingdedede745 »

It’s fun to program. And I was curious what the best questions to ask were.
User avatar
DulcineaFN
Posts: 3
Joined: 12 July 2020, 19:01

Re: I wrote a python program to solve this game

Post by DulcineaFN »

If it's an easy enough game so that it's solvable by a computer that effortlessly, I'm not interested in playing. Thanks for the program, now I know to not play.
User avatar
Mr PaRaDoX
Posts: 3
Joined: 15 July 2024, 21:57

Re: I wrote a python program to solve this game

Post by Mr PaRaDoX »

DulcineaFN wrote: 04 August 2025, 00:48 If it's an easy enough game so that it's solvable by a computer that effortlessly, I'm not interested in playing. Thanks for the program, now I know to not play.
What you fail to realize is that, this program makes the best questions, and the whole point of the game is NOT to make the best question ... if you make the final best question, your opponent will be able to win.

Play games that you like, and please take a moment to think before you reject a game.
Yes the solution might be easily calculated with a program, that is when there actually is a solution on the board of course.

With all that said I am a programmer myself too, and i am all in to create helpful programs that help you keep track of things in a game, like counting cards for example.
User avatar
jjthejetplane246
Posts: 31
Joined: 11 January 2019, 18:33

Re: I wrote a python program to solve this game

Post by jjthejetplane246 »

This code should not be publicly available. It just gives resources to cheaters.
User avatar
Nuts00
Posts: 8
Joined: 17 May 2021, 08:04

Re: I wrote a python program to solve this game

Post by Nuts00 »

Oh i see now...why this number one guy deduct code so quick : D
I remove this game from my favorite game ;-)
User avatar
Moose 5566
Posts: 13
Joined: 14 February 2024, 17:15

Re: I wrote a python program to solve this game

Post by Moose 5566 »

Mr PaRaDoX wrote: 04 August 2025, 07:58
DulcineaFN wrote: 04 August 2025, 00:48 If it's an easy enough game so that it's solvable by a computer that effortlessly, I'm not interested in playing. Thanks for the program, now I know to not play.
What you fail to realize is that, this program makes the best questions, and the whole point of the game is NOT to make the best question ... if you make the final best question, your opponent will be able to win.

Play games that you like, and please take a moment to think before you reject a game.
Yes the solution might be easily calculated with a program, that is when there actually is a solution on the board of course.

With all that said I am a programmer myself too, and i am all in to create helpful programs that help you keep track of things in a game, like counting cards for example.
I just started yesterday and I was really struggling. Today I finally figured it out and I 100% agree that sometimes it is better to ask misleading questions and hope they can ask one that will help you to figure the last few.
Post Reply

Return to “Digit Code”