Hey Dan, have you seen EEM's at play with J article? http://www.jsoftware.com/jwiki/Doc/Articles/Play191
Ken On Thu, Apr 25, 2013 at 7:30 PM, Dan Bron <[email protected]> wrote: > I'm playing the Game of Nim with a colleague. He's an old hand and knows > all the patterns by heart. I do not. I can't beat him. > > But I can do this: > > winNim =: (* 0&<)@(- (~:"1 ~:/)&.#:) > > So if you have a Nim board like this: > > 1 1 1 1 1 > 1 1 1 1 > 1 1 1 > 1 1 > 1 > > You can win like this: > > winNim 5 4 3 2 1 > 1 0 1 0 1 > > That is, remove one stick from the pile of 5, or the pile of 3, or the pile > of 1. > > A bandaid for my pride. > > -Dan > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Ken Lettow Director of Market Intelligence & Web Analytics ThomasNet (212) 290-8713 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
