{"id":50,"date":"1997-01-01T13:01:34","date_gmt":"1997-01-01T13:01:34","guid":{"rendered":"https:\/\/hostadm.lithium.selfhost.de\/?p=50"},"modified":"2020-09-09T20:02:58","modified_gmt":"2020-09-09T20:02:58","slug":"mastermind","status":"publish","type":"post","link":"https:\/\/martin-seewaldt.de\/?p=50","title":{"rendered":"Mastermind"},"content":{"rendered":"<p><b><\/b><b>Gestelltes Problem<\/b><br \/>\nUrspr\u00fcnglich ging es um eine Wette mit einem Kumpel, wer wohl das bessere Programm f\u00fcr das Spiel Mastermind schreiben k\u00f6nne. Das Schwierige dabei war, dass der Computer die Kombination erraten musste. Ich habe fast zwei Wochen gebraucht, bis ich einen Algorithmus fand. Wer damals (1988) die Wette gewann wird nur per Mail verraten.<br \/>\n1997 habe ich dann das Programm in Java erneut geschrieben. Auch die Grafiken sind alle selbst gemacht.<\/p>\n<p><b>Algorithmus<\/b><br \/>\nIst eigentlich entt\u00e4uschend einfach. Es werden alle m\u00f6glichen Kombinationen in einem Feld gespeichert. Die erste Kombination aus diesem Feld, im Screenshot (hier weiss, schwarz, blau, gelb) wird dem Benutzer angeboten. Dann gibt der Benutzer seine Bewertung (hier zwei weisse Stecker). Nun kommt der Trick. Das Programm nimmt jede Kombination aus dem Feld und pr\u00fcft, welche Bewertung der Benutzer der eben angebotenen Kombination gegeben h\u00e4tte, wenn es die Kombination des Benutzers w\u00e4re. Wenn der Benutzer also die Kombination (weiss, schwarz, blau, gelb) h\u00e4tte, dann w\u00fcrde er f\u00fcr die angebotene Kombination (weiss, schwarz, blau, gelb) vier schwarze Stecker vergeben. Er vergab aber zwei weisse Stecker. Also wird diese Kombination gestrichen. \u00dcbrig bleiben die Kombinationen, die zusammen mit (weiss, schwarz, blau, gelb) zwei weisse Stecker ergeben. Jetzt wird die erste der \u00fcbrigen Kombinationen (schwarz, weiss, gr\u00fcn, rot) angeboten. Nach maximal sechs Z\u00fcgen ist die Kombination erraten.<\/p>\n<p><b>Screenshot:<\/b><br \/>\n<img decoding=\"async\" src=\"https:\/\/martin-seewaldt.de\/Programme\/Mastermind.jpg\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gestelltes Problem Urspr\u00fcnglich ging es um eine Wette mit einem Kumpel, wer wohl das bessere Programm f\u00fcr das Spiel Mastermind schreiben k\u00f6nne. Das Schwierige dabei war, dass der Computer die Kombination erraten musste. Ich habe fast zwei Wochen gebraucht, bis ich einen Algorithmus fand. Wer damals (1988) die Wette gewann wird nur per Mail verraten. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[3],"tags":[],"class_list":["post-50","post","type-post","status-publish","format-standard","hentry","category-programme_apps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mastermind - Martin Seewaldt<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/martin-seewaldt.de\/?p=50\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mastermind - Martin Seewaldt\" \/>\n<meta property=\"og:description\" content=\"Gestelltes Problem Urspr\u00fcnglich ging es um eine Wette mit einem Kumpel, wer wohl das bessere Programm f\u00fcr das Spiel Mastermind schreiben k\u00f6nne. Das Schwierige dabei war, dass der Computer die Kombination erraten musste. Ich habe fast zwei Wochen gebraucht, bis ich einen Algorithmus fand. Wer damals (1988) die Wette gewann wird nur per Mail verraten. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/martin-seewaldt.de\/?p=50\" \/>\n<meta property=\"og:site_name\" content=\"Martin Seewaldt\" \/>\n<meta property=\"article:published_time\" content=\"1997-01-01T13:01:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-09T20:02:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/martin-seewaldt.de\/Programme\/Mastermind.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/#\\\/schema\\\/person\\\/a1a6571321f54991629bb99be16f5e5f\"},\"headline\":\"Mastermind\",\"datePublished\":\"1997-01-01T13:01:34+00:00\",\"dateModified\":\"2020-09-09T20:02:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50\"},\"wordCount\":229,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/martin-seewaldt.de\\\/Programme\\\/Mastermind.jpg\",\"articleSection\":[\"Programme\\\/Apps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50\",\"url\":\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50\",\"name\":\"Mastermind - Martin Seewaldt\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/martin-seewaldt.de\\\/Programme\\\/Mastermind.jpg\",\"datePublished\":\"1997-01-01T13:01:34+00:00\",\"dateModified\":\"2020-09-09T20:02:58+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/#\\\/schema\\\/person\\\/a1a6571321f54991629bb99be16f5e5f\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50#primaryimage\",\"url\":\"https:\\\/\\\/martin-seewaldt.de\\\/Programme\\\/Mastermind.jpg\",\"contentUrl\":\"https:\\\/\\\/martin-seewaldt.de\\\/Programme\\\/Mastermind.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/?p=50#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/martin-seewaldt.de\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mastermind\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/#website\",\"url\":\"https:\\\/\\\/martin-seewaldt.de\\\/\",\"name\":\"Martin Seewaldt\",\"description\":\"Einige meiner Projekte\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/martin-seewaldt.de\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/martin-seewaldt.de\\\/#\\\/schema\\\/person\\\/a1a6571321f54991629bb99be16f5e5f\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8c382657803c93429dee7a228c33968728e6adc9a850a0b0488abd4e9c466179?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8c382657803c93429dee7a228c33968728e6adc9a850a0b0488abd4e9c466179?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8c382657803c93429dee7a228c33968728e6adc9a850a0b0488abd4e9c466179?s=96&d=mm&r=g\",\"caption\":\"admin\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mastermind - Martin Seewaldt","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/martin-seewaldt.de\/?p=50","og_locale":"en_US","og_type":"article","og_title":"Mastermind - Martin Seewaldt","og_description":"Gestelltes Problem Urspr\u00fcnglich ging es um eine Wette mit einem Kumpel, wer wohl das bessere Programm f\u00fcr das Spiel Mastermind schreiben k\u00f6nne. Das Schwierige dabei war, dass der Computer die Kombination erraten musste. Ich habe fast zwei Wochen gebraucht, bis ich einen Algorithmus fand. Wer damals (1988) die Wette gewann wird nur per Mail verraten. [&hellip;]","og_url":"https:\/\/martin-seewaldt.de\/?p=50","og_site_name":"Martin Seewaldt","article_published_time":"1997-01-01T13:01:34+00:00","article_modified_time":"2020-09-09T20:02:58+00:00","og_image":[{"url":"https:\/\/martin-seewaldt.de\/Programme\/Mastermind.jpg","type":"","width":"","height":""}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/martin-seewaldt.de\/?p=50#article","isPartOf":{"@id":"https:\/\/martin-seewaldt.de\/?p=50"},"author":{"name":"admin","@id":"https:\/\/martin-seewaldt.de\/#\/schema\/person\/a1a6571321f54991629bb99be16f5e5f"},"headline":"Mastermind","datePublished":"1997-01-01T13:01:34+00:00","dateModified":"2020-09-09T20:02:58+00:00","mainEntityOfPage":{"@id":"https:\/\/martin-seewaldt.de\/?p=50"},"wordCount":229,"commentCount":0,"image":{"@id":"https:\/\/martin-seewaldt.de\/?p=50#primaryimage"},"thumbnailUrl":"https:\/\/martin-seewaldt.de\/Programme\/Mastermind.jpg","articleSection":["Programme\/Apps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/martin-seewaldt.de\/?p=50#respond"]}]},{"@type":"WebPage","@id":"https:\/\/martin-seewaldt.de\/?p=50","url":"https:\/\/martin-seewaldt.de\/?p=50","name":"Mastermind - Martin Seewaldt","isPartOf":{"@id":"https:\/\/martin-seewaldt.de\/#website"},"primaryImageOfPage":{"@id":"https:\/\/martin-seewaldt.de\/?p=50#primaryimage"},"image":{"@id":"https:\/\/martin-seewaldt.de\/?p=50#primaryimage"},"thumbnailUrl":"https:\/\/martin-seewaldt.de\/Programme\/Mastermind.jpg","datePublished":"1997-01-01T13:01:34+00:00","dateModified":"2020-09-09T20:02:58+00:00","author":{"@id":"https:\/\/martin-seewaldt.de\/#\/schema\/person\/a1a6571321f54991629bb99be16f5e5f"},"breadcrumb":{"@id":"https:\/\/martin-seewaldt.de\/?p=50#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/martin-seewaldt.de\/?p=50"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/martin-seewaldt.de\/?p=50#primaryimage","url":"https:\/\/martin-seewaldt.de\/Programme\/Mastermind.jpg","contentUrl":"https:\/\/martin-seewaldt.de\/Programme\/Mastermind.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/martin-seewaldt.de\/?p=50#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/martin-seewaldt.de\/"},{"@type":"ListItem","position":2,"name":"Mastermind"}]},{"@type":"WebSite","@id":"https:\/\/martin-seewaldt.de\/#website","url":"https:\/\/martin-seewaldt.de\/","name":"Martin Seewaldt","description":"Einige meiner Projekte","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/martin-seewaldt.de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/martin-seewaldt.de\/#\/schema\/person\/a1a6571321f54991629bb99be16f5e5f","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8c382657803c93429dee7a228c33968728e6adc9a850a0b0488abd4e9c466179?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8c382657803c93429dee7a228c33968728e6adc9a850a0b0488abd4e9c466179?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8c382657803c93429dee7a228c33968728e6adc9a850a0b0488abd4e9c466179?s=96&d=mm&r=g","caption":"admin"}}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/martin-seewaldt.de\/index.php?rest_route=\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/martin-seewaldt.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/martin-seewaldt.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/martin-seewaldt.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/martin-seewaldt.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=50"}],"version-history":[{"count":3,"href":"https:\/\/martin-seewaldt.de\/index.php?rest_route=\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":499,"href":"https:\/\/martin-seewaldt.de\/index.php?rest_route=\/wp\/v2\/posts\/50\/revisions\/499"}],"wp:attachment":[{"href":"https:\/\/martin-seewaldt.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/martin-seewaldt.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/martin-seewaldt.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}