{"id":4441,"date":"2026-06-03T07:00:00","date_gmt":"2026-06-02T22:00:00","guid":{"rendered":"https:\/\/litcoder.com\/?p=4441"},"modified":"2026-05-23T23:15:56","modified_gmt":"2026-05-23T14:15:56","slug":"alpha-beta-pruning%ec%9c%bc%eb%a1%9c-%ed%83%90%ec%83%89%ec%8b%9c%ea%b0%84-%ec%a0%88%ec%95%bd","status":"publish","type":"post","link":"https:\/\/litcoder.com\/?p=4441","title":{"rendered":"Alpha-Beta Pruning\uc73c\ub85c Minimax \ud0d0\uc0c9\uc2dc\uac04 \uac1c\uc120"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/litcoder.com\/?p=4406\" data-type=\"link\" data-id=\"https:\/\/litcoder.com\/wp-admin\/post.php?post=4406\">Minimax Algorithm\uacfc \uac04\ub2e8\ud55c \uc608\uc81c<\/a> \ud3ec\uc2a4\ud305\uc5d0\uc11c \uc0ac\uc6a9\ud588\ub358 \uc608\uc81c\uc5d0\uc11c main()\ud568\uc218\uc5d0 \uc788\ub294 <code>total_coins<\/code> \ubcc0\uc218\uc758 \uac12\uc744 12\uc5d0\uc11c 32\uc774\ub85c \uc99d\uac00\uc2dc\ucf1c\uc11c \uc2e4\ud589\ud574 \ubcf4\uba74 \ucef4\ud4e8\ud130\uac00 \ub2f5\uc744 \ub0b4\ub294 \uc2dc\uac04\uc774 \uae30\ud558 \uae09\uc218\uc801\uc73c\ub85c \ub298\uc5b4\ub098\uc11c \uccab \ub300\ub2f5\uc744 \ud0d0\uc0c9\ud558\ub294\ub370 \ub300\ub7b5 30\ucd08 \uc815\ub3c4 \uc2dc\uac04\uc774 \uac78\ub9ac\ub294 \uac83\uc744 \ubcfc \uc218 \uc788\ub2e4(Macbook Pro M5 \uae30\uc900).<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main():\n    total_coins = 32 # \uc6d0\ub798\ub294 12\uc784.\n    ...<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\ub294 \uac01 \ub178\ub4dc\ub4e4\uc758 \uc120\ud0dd\uac00\ub2a5\ud55c \uc870\uac74\uc774 3\uac1c\uc529\uc774\uc5b4\uc11c 32\uac1c\uc758 \ucf54\uc778\uc744 \uac00\uc815\ud558\ub294 \uacbd\uc6b0 \uc774\ub860\uc0c1 \ub300\ub7b5 1000\uc870\uac00\uc9c0\uac00 \ub118\ub294 \ub178\ub4dc\ub4e4\uc744 \ud0d0\uc0c9\ud574\uc57c \ud558\uae30 \ub54c\ubb38\uc774\ub2e4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Pruning(\uac00\uc9c0\uce58\uae30)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\ud558\uc9c0\ub9cc, \uc2e4\uc81c\ub85c\ub294 \ubaa8\ub4e0 \ub178\ub4dc\ub4e4\uc744 \ud0d0\uc0c9\ud574\uc57c \ud558\ub294 \uac83\uc740 \uc544\ub2c8\ub2e4. \uac1c\uc911\uc5d0\ub294 \uc5b4\ucc28\ud53c \ud0d0\uc0c9\ud574 \ub4e4\uc5b4\uac00 \ubd24\uc790 \uc120\ud0dd\ub418\uc9c0 \uc54a\uc744 \uac12\uc744 \uac00\uc9c4 \uac83\ub4e4\uc774 \uc788\uae30 \ub54c\ubb38\uc5d0 \uc774\ub7ec\ud55c \uac83\ub4e4\uc744 \ubbf8\ub9ac \uc54c \uc218\ub9cc \uc788\ub2e4\uba74 \ud0d0\uc0c9 \ud560 \ud544\uc694\uac00 \uc5c6\ub294 \uacbd\ub85c\ub4e4\uc5d0 \ub300\ud574 \ud0d0\uc0c9\uc744 \uc218\ud589\ud558\uc9c0 \uc54a\uc74c\uc73c\ub85c\uc368 \uc18c\uc694\ub418\ub294 \uc2dc\uac04\uc744 \uc544\ub07c\uace0 \ud6a8\uc728\uc801\uc778 \ud0d0\uc0c9\uc744 \uc218\ud589\ud560 \uc218 \uc788\ub2e4. \uc774\ub7ec\ud55c \ub3d9\uc791\uc744 &#8220;\uac00\uc9c0\uce58\uae30&#8221;\ub77c\uace0 \ud558\ub294\ub370, alpha\uc640 beta\ub77c\ub294 \ub450\uac1c\uc758 \uacbd\uacc4\uac12\uc744 \uc720\uc9c0\ud558\ub294 \uac83\uc73c\ub85c \uc774\ub8e8\uc5b4\uc9c4\ub2e4.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u03b1(alpha):&nbsp;\ud604\uc7ac\uae4c\uc9c0 Max(\ucef4\ud4e8\ud130)\uac00 \ud655\ubcf4\ud55c&nbsp;\uac00\uc7a5 \ub192\uc740 \uc810\uc218<\/li>\n\n\n\n<li>\u03b2(beta):&nbsp;\ud604\uc7ac\uae4c\uc9c0 Min(\uc0ac\uc6a9\uc790)\uac00 \ud655\ubcf4\ud55c&nbsp;\uac00\uc7a5 \ub0ae\uc740 \uc810\uc218<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\ud0d0\uc0c9 \ub3c4\uc911\uc5d0 \u03b1 &gt;= \u03b2\uac00 \ub418\ub294 \uc21c\uac04\uc774 \uc788\ub2e4\uba74, \uc774\ub7ec\ud55c \uacbd\ub85c\ub294 \uc120\ud0dd\ub420 \ub9ac\uac00 \uc5c6\ub2e4\uace0 \uac00\uc815\ud558\uace0 \ud0d0\uc0c9\uc744 \uc911\ub2e8\ud55c\ub2e4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\uad6c\ud604 \uc608\uc81c<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\ub2e4\uc74c\uc758 \ucf54\ub4dc\ub294 &#8220;\ubcc0\ud615 nim game&#8221; \uc608\uc81c\uc5d0 Alpha-Beta purining\uc744 \uc801\uc6a9\ud55c \uac83\uc774\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><script src=\"https:\/\/gist.github.com\/e2f39b13aac6b0c2e69fc621e6fcc0a6.js\"><\/script><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\uc2e4\ud589\uacb0\uacfc \ubc0f \uacb0\ub860<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774 \ud504\ub85c\uadf8\ub7a8\uc744 \uc2e4\ud589\ud558\uace0 \ucef4\ud4e8\ud130\uc758 \ud134\uc73c\ub85c \uac8c\uc784\uc744 \uc2dc\uc791\ud558\uba74 \uae30\uc874\uc5d0 30\ucd08 \uac00\ub7c9 \uac78\ub9ac\ub358 \ud0d0\uc0c9\uc2dc\uac04\uc774 2\ucd08 \uc815\ub3c4\ub85c \uc904\uc5b4\ub4dc\ub294 \uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\ub2e4.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"594\" height=\"66\" src=\"https:\/\/litcoder.com\/wp-content\/uploads\/2026\/06\/minimax_vs_pruning.png\" alt=\"\" class=\"wp-image-4493\" srcset=\"https:\/\/litcoder.com\/wp-content\/uploads\/2026\/06\/minimax_vs_pruning.png 594w, https:\/\/litcoder.com\/wp-content\/uploads\/2026\/06\/minimax_vs_pruning-300x33.png 300w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/><\/figure>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Minimax Algorithm\uacfc \uac04\ub2e8\ud55c \uc608\uc81c \ud3ec\uc2a4\ud305\uc5d0\uc11c \uc0ac\uc6a9\ud588\ub358 \uc608\uc81c\uc5d0\uc11c main()\ud568\uc218\uc5d0 \uc788\ub294 total_coins \ubcc0\uc218\uc758 \uac12\uc744 12\uc5d0\uc11c 32\uc774\ub85c \uc99d\uac00\uc2dc\ucf1c\uc11c \uc2e4\ud589\ud574 \ubcf4\uba74 \ucef4\ud4e8\ud130\uac00 \ub2f5\uc744 \ub0b4\ub294 \uc2dc\uac04\uc774 \uae30\ud558 \uae09\uc218\uc801\uc73c\ub85c \ub298\uc5b4\ub098\uc11c \uccab \ub300\ub2f5\uc744 \ud0d0\uc0c9\ud558\ub294\ub370 \ub300\ub7b5 30\ucd08 \uc815\ub3c4 \uc2dc\uac04\uc774 \uac78\ub9ac\ub294 \uac83\uc744 \ubcfc \uc218 \uc788\ub2e4(Macbook Pro M5 \uae30\uc900). \uc774\ub294 \uac01 \ub178\ub4dc\ub4e4\uc758 \uc120\ud0dd\uac00\ub2a5\ud55c \uc870\uac74\uc774 3\uac1c\uc529\uc774\uc5b4\uc11c 32\uac1c\uc758 \ucf54\uc778\uc744 \uac00\uc815\ud558\ub294 \uacbd\uc6b0 \uc774\ub860\uc0c1 \ub300\ub7b5 1000\uc870\uac00\uc9c0\uac00 \ub118\ub294 \ub178\ub4dc\ub4e4\uc744 \ud0d0\uc0c9\ud574\uc57c [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[393,10,440,439,441,105,135],"class_list":["post-4441","post","type-post","status-publish","format-standard","hentry","category-programming","tag-ai","tag-algorithm","tag-alpha-beta","tag-minimax","tag-pruning","tag-python","tag-tree"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts\/4441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4441"}],"version-history":[{"count":19,"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts\/4441\/revisions"}],"predecessor-version":[{"id":4496,"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts\/4441\/revisions\/4496"}],"wp:attachment":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}