gamesmathematical programsotherabout author

Bulls and cows game

ru

Bulls and cows is popular paper and pencil game see rules in wikipedia.

The site concerns two optimization ways of bulls and cows game.

First optimization way

It's known that there is no algorithm which could solve all secret numbers using up to six turns, and there are algorithms which could solve any secret number using up to seven turns. The goal is to find algorithm which minimizes quantity of secret numbers which algorithm can guess using exactly seven turns (all others should be guessed for up to six turns). Now the best found algorithm guesses only 50 numbers using for exactly seven turns (see crush5o algorithm results).

Second optimization way

The second way is minimizing average amount of turns for guess arbitrary secret number (minimizing average game length). This problem is solved. The best average game length is 26274/5040=5.2131 turns (see avg5 algorithm results).

During for research some intermediate algorithms (crush45o which solves 63 secret numbers for exactly seven turns and avg45 which has average game length 26306/5040=5.219) were created. For all of the algorithms were builded trees on javascript. Thus it's possible browse that trees, view statistics and play online using one of the algorithms. As well it was created article which includes mathematical part, programming part and part with the results.

Now I'm in one step of making exhaustive search for first optimization type, but it takes many CPU hours. To finish research I need powerful servers for long calculations. The problem is very good parallelizable on many threads. The kernel of project is written on standard c++ so only what I need is c++ compiler.