Page 1 of 1
I wrote a python program to solve this game
Posted: 09 July 2025, 06:15
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
Re: I wrote a python program to solve this game
Posted: 19 July 2025, 17:57
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?
Re: I wrote a python program to solve this game
Posted: 19 July 2025, 19:47
by kingdedede745
It’s fun to program. And I was curious what the best questions to ask were.
Re: I wrote a python program to solve this game
Posted: 04 August 2025, 00:48
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.
Re: I wrote a python program to solve this game
Posted: 04 August 2025, 07:58
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.
Re: I wrote a python program to solve this game
Posted: 04 August 2025, 17:51
by jjthejetplane246
This code should not be publicly available. It just gives resources to cheaters.
Re: I wrote a python program to solve this game
Posted: 06 August 2025, 01:10
by Nuts00
Oh i see now...why this number one guy deduct code so quick : D
I remove this game from my favorite game

Re: I wrote a python program to solve this game
Posted: 08 August 2025, 21:03
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.