{"id":391,"date":"2026-02-19T22:15:08","date_gmt":"2026-02-19T22:15:08","guid":{"rendered":"https:\/\/ffritze.de\/?p=391"},"modified":"2026-04-21T20:48:08","modified_gmt":"2026-04-21T20:48:08","slug":"nim-spiel-unplugged-learning","status":"publish","type":"post","link":"https:\/\/ffritze.de\/en\/nim-spiel-unplugged-learning\/","title":{"rendered":"NIM game \u2013 unplugged learning"},"content":{"rendered":"<p class=\"wp-block-paragraph\">The NIM game is a game in which two players play against each other. It is excellent to clarify machine learning according to the principle of reinforcement learning.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h3 class=\"wp-block-heading\" style=\"text-decoration:underline\">Game construction<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">There are 10 game pieces in a row.<\/p>\n\n\n\n<div class=\"wp-block-group is-content-justification-center is-nowrap is-layout-flex wp-container-core-group-is-layout-82936891 wp-block-group-is-layout-flex\">\n<figure class=\"wp-block-image size-medium is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"135\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Spielfiguren-300x135.png\" alt=\"\" class=\"wp-image-396\" style=\"box-shadow:var(--wp--preset--shadow--natural);aspect-ratio:2.2177811939533694;width:369px;height:auto\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Spielfiguren-300x135.png 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Spielfiguren-768x346.png 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Spielfiguren.png 998w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/figure>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"text-decoration:underline\">Game sequence<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The players take turns taking away one, two or three pieces in turn. The player who takes the last piece from the field has lost the game.<\/p>\n\n\n\n<div style=\"height:29px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"--tw-animation-delay:0.6s;\" class=\"has-text-align-center tw-block-animation tw-animation-scale-in tw-duration-4 wp-block-paragraph\"><em>Try it out until you find a strategy!<\/em><\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><br>Ablauf f\u00fcr einen KI-Spieler<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now a player is playing against a computer player. Here's how you can build and run the game:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"text-decoration:underline\">Game construction<\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7ec2a0c6 wp-block-columns-is-layout-flex\" style=\"padding-right:0;padding-left:0\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:75%\">\n<p class=\"wp-block-paragraph\">Place a mug with three coins representing the values 1, 2 and 3 behind the first nine pieces of play. You will quickly find that some coins are not needed for this game, so you can put them aside.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<figure class=\"wp-block-image size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"200\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Spiel_Aufbau-300x200.jpg\" alt=\"\" class=\"wp-image-400\" style=\"box-shadow:var(--wp--preset--shadow--natural)\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Spiel_Aufbau-300x200.jpg 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Spiel_Aufbau-1024x682.jpg 1024w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Spiel_Aufbau-768x512.jpg 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Spiel_Aufbau-1536x1023.jpg 1536w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Spiel_Aufbau-2048x1364.jpg 2048w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"text-decoration:underline\">Game sequence<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When it is the computer player's turn, randomly draw a coin from the cup behind the next piece that can be taken and place it in front of the cup (between the cup and the piece).<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-84f855d9 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"box-shadow:var(--wp--preset--shadow--natural);flex-basis:35%\">\n<figure class=\"wp-block-image size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Durchfuehrung-300x300.png\" alt=\"NIM-Spiel Durchf\u00fchrung\" class=\"wp-image-408\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Durchfuehrung-300x300.png 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Durchfuehrung-150x150.png 150w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Durchfuehrung-768x768.png 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Durchfuehrung.png 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<p class=\"wp-block-paragraph\">Now take the number of figures from the row that indicates the value of the coin. Pay attention: If there are not enough figures in the row to reach the value of the coin, this coin should not have been in the cup at all.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If the AI player loses, remove the coin that led to defeat from the game - unless it is the last coin in the cup. In this case, take the previous coin from the cup (unless it is also the last coin).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Put the remaining coins back in the cup and start the game again.<\/p>\n\n\n\n<div style=\"height:17px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group has-custom-gelb-transparent-background-color has-background has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\" style=\"border-width:1px;border-top-left-radius:35px;border-top-right-radius:35px;border-bottom-left-radius:35px;border-bottom-right-radius:35px;margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--30);box-shadow:var(--wp--preset--shadow--natural)\">\n<div class=\"wp-block-media-text is-stacked-on-mobile\" style=\"border-style:none;border-width:0px;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-left-radius:0px;border-bottom-right-radius:0px;margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--40);grid-template-columns:20% auto\"><figure class=\"wp-block-media-text__media\"><a href=\"https:\/\/cults3d.com\/de\/modell-3d\/verschiedene\/nim-spiel\" target=\"_blank\" rel=\" noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1002\" height=\"1016\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Becher.png\" alt=\"\" class=\"wp-image-402 size-thumbnail\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Becher.png 1002w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Becher-296x300.png 296w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/02\/NIM_Becher-768x779.png 768w\" sizes=\"auto, (max-width: 1002px) 100vw, 1002px\" \/><\/a><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\">You can find the print files (.stl) for cups, coins and game pieces (in addition to a more detailed game instructions) at <a href=\"https:\/\/cults3d.com\/de\/modell-3d\/verschiedene\/nim-spiel\" target=\"_blank\" rel=\"noreferrer noopener\">cults3d<\/a> or <a href=\"https:\/\/makerworld.com\/de\/models\/1470837\" target=\"_blank\" rel=\"noreferrer noopener\">makerworld<\/a>.<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group has-custom-hellblau-transparent-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-34a480d6 wp-block-group-is-layout-constrained\" style=\"border-width:1px;border-top-left-radius:25px;border-top-right-radius:25px;border-bottom-left-radius:25px;border-bottom-right-radius:25px;padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20);box-shadow:var(--wp--preset--shadow--natural)\">\n<h2 class=\"wp-block-heading\">Reinforce learning using the example of the NIM game<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Reinforcement learning (or reinforcement learning) is a learning approach in which an agent (in this case the cups with the coins) learns to make optimal decisions through interactions with an environment. The agent receives rewards or punishments based on his actions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here the agent is punished by not putting the coins back in the cups in case of defeat. In the event of a victory, nothing happens, i.e. the coins that led to the victory are put back in the cup. That's the reward.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>The NIM game is a game in which two players play against each other. It is excellent to clarify machine learning according to the principle of reinforcement learning.<\/p>","protected":false},"author":2,"featured_media":392,"comment_status":"open","ping_status":"open","sticky":false,"template":"seite-thoughts-beitrag","format":"standard","meta":{"footnotes":""},"categories":[35,34],"tags":[38,39,36,37,40],"class_list":["post-391","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-printlab","category-unplugged","tag-ai","tag-ki","tag-maschinelles-lernen","tag-reinforcement-learning","tag-unplugged"],"_links":{"self":[{"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/posts\/391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/comments?post=391"}],"version-history":[{"count":0,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/posts\/391\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/media\/392"}],"wp:attachment":[{"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/media?parent=391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/categories?post=391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/tags?post=391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}