猜数字: https://leetcode-cn.com/problems/bulls-and-cows/
https://en.wikipedia.org/wiki/Bulls_and_Cows
Guess the 4 distict number:
Basic usage:
- Enter your guess (4 distinct digits) in the textbox
- Click
- It will show correct position and number (?A?B)
- It also shows remain possible candidates count
- If your hover cursor over the candidate count value, it shows the first 10 candidate values
- Click the if your want start a new game
- Click the will output a guess with one of the algorithm:
- min-largest-group-size (Knuth, 1977)
- min-group-expect-size (Irving, 1978)
- max-group-entropy
Test the algorithm:
- Choose 4 distinct digits. For example `2468`
- Click , it will display a result in the textbox. Let's say it's `0123`
- Feedback correct positions and numbers in the textbox: `0123 0A1B`
- Click
- The algorithm may supply a new guess: `1456`, goto step 3.