DEV Community

Mastering 1A2B (Bulls and Cows): Strategy, Algorithms, and Deduction (opens in new tab)

Discussed on DEV

Mastering 1A2B (Bulls and Cows): Strategy, Algorithms, and the Science of Deduction 1A2B — known internationally as Bulls and Cows, and also as Mastermind (in peg-colour form) — is one of the most elegant information theory puzzles ever devised. In its classic 4-digit form, you are trying to guess a 4-digit secret number (all digits unique, no zeros) in as few guesses as possible, using only the feedback you receive each round. The feedback is deceptively simple: A (Bulls): How many digits ar...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help