JOIN
 Select a Forum     Round Tables New Member Discussions News Discussions Algorithm Matches Marathon Matches NASA Tournament Lab TopCoder Cookbook High School Matches Sponsor Discussions Development Forums Design Forums Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings View: Flat  | Threaded  | Tree Previous Thread  |  Next Thread Forums News, Programs & Events Discussions Algorithm Games (Article) Help with LongLongNim
 Help with LongLongNim | Reply Hi, I wonder if anybody could help with thisI post a piece of sample code from one of the solutions to LongLongNim```for(i = 0; i < moves.size(); i++) mmask |= 1 << moves[i] - 1; for(i = 0; i < 1 << 22; i++) x[i] = (i << 1 & 0x3FFFFF) + (((mmask & i) != mmask) ? 1 : 0); ```What I cant understand is the theory behind "mmask & i". Why are we doing this?As far as I understand from the tutorial, the requirements for a game to be winning or losing are based on some simple rules - how are those translated to this algorithm?thanks in advance
 Subject Author Date Help with LongLongNim sandys May 30, 2007 at 12:33 AM EDT
 Forums News, Programs & Events Discussions Algorithm Games (Article) Help with LongLongNim Previous Thread  |  Next Thread