Lurker News

Comments (491) 209 threads

Earlier comments
SomaticPirate#
The median of medians algorithm still occupies a special place as one of the first algorithms that seemed to be magical.
quickthrower21 reply#
The (fairly simple) nimber algorithm for optimal nim play which can then be applied to other games e.g. dots and boxes
todd81 reply#
I learned this while hanging out in the library (Martin Gardner’s column in Scientific American). I put it to good use years later in college: I decided to implement a Nim playing circuit (out of RTL logic gates, yuk!) for my digital design lab course final project in 1975. It was a complex sequential circuit, but the result was quite remarkable. It played perfect Nim with up to four piles of 1 to 16 tokens.
quickthrower2#
I'm reading dots and boxes by Elwyn Berlekamp. It describes how to relate the two games. That might interest you.

I like your project idea. I'm not hard core enough to build something from transistors but I'd love to give nin a go in assembler on an arduino. Something to add to my backlog!

yangmaster1 reply#
Fisher-Yates shuffle. An elegant and surprisingly intuitive O(n) algorithm that doesn't take up extra memory.

Load more comments