ElectroBit
ElectroBit
88 / 7
13th Sep 2017
17th Oct 2017
Play Nim against a machine! Instructions on how to play Nim are inside the save. [The save should be have exactly 48212 pixels when not in operation.]
computer nim game literallyawesome nimble cantwin electronic

Comments

  • ElectroBit
    ElectroBit
    19th Sep 2017
    I mentioned this earlier, it has more strategies. 1-1-2-0 is only a losing position if the machine only had one strategy. Here the machine is still able to beat you in that position ID:2187742
  • Di97
    Di97
    19th Sep 2017
    Yep, if we add all matches, it'll leave us with even number. When it comes to 1 or 2 matches left, then it acts as needed to win. I have tried to play with it multiple time, tried to copy it's strategy. All went to nothing because of the amount of matches left. Winning combinaion will be like: 1-0-6-0 or 1-1-2-0, which bot avoids to do.
  • ElectroBit
    ElectroBit
    19th Sep 2017
    It will sometimes do something different like here ID:2187741
  • Di97
    Di97
    19th Sep 2017
    I see. I studied it even more. It always equalizes 2 rows. Because of that, it'll never let you win, as you must to take equalizing role in your hands to win it. But overall it's pretty entertaining to try and reverse engineer it. +1
  • ElectroBit
    ElectroBit
    19th Sep 2017
    The key to Nim is not to even out rows, but to make the XOR result (aka "Nim Sum") of the number of matchsticks in each row equal to zero. In this 4-5-6-7 configuration the Nim Sum is equal to zero.
  • ElectroBit
    ElectroBit
    19th Sep 2017
    This is not the only strategy. If you make it impossible for it to even out the amount of matchsticks in each row it will use different strategies. For example, at the start of the game, you can remove one red matchstick.
  • Di97
    Di97
    19th Sep 2017
    Analyzed deeper the bot and the game, I can say chances to win are none, because of the rows. 4 rows will always give bot chance to win. As for player, luck will never be on his side because they will always get move when there are even amount of matches on 2 rows. The strategy is to leave your opponent with only 4 matches with 2 on each row. Bot will never let you do that
  • Di97
    Di97
    19th Sep 2017
    Nvm about both. It was jacob1's mod sheningans. It's pretty interesting game, but the fact that bot always moves 2nd prevents you from changing places with it. So you'll always end up losing. It always tries to save 2 sticks on 2 rows, which is pretty clever move.
  • Di97
    Di97
    19th Sep 2017
    Nvm about 2nd one, it's jacob1's mod thing
  • Di97
    Di97
    19th Sep 2017
    And another win, yet I can't end because your bot decided to break itself. 2187727