|
|
|
|
|
by hencq
3328 days ago
|
|
You can pick a guess for the code and evaluate it against every potential code and see what the reply would be (like BBWW). E.g. I pick 1122 and run it against all possible codes. If you group the number of results for every reply you essentially get a table that tells you for every reply how many possible eligible codes are left. You can then determine for each guess what the worst reply is you could get, namely the one that has the most eligible codes left. For your next guess you pick a code that has the best worst case scenario. Essentially it's minimax. You can speed up the first step by realizing you don't need to test every code. E.g. 1122 and 1133 are essentially equivalent. You only have five unique choices for the first step 1111, 1112, 1122, 1223, 1234. If you run all codes against those 5, you'll get the first step. Continue doing it for the rest and you'll get the other steps. |
|