{"id":466591,"date":"2025-07-09T21:00:22","date_gmt":"2025-07-09T21:00:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=466591"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=466591","title":{"rendered":"<span>goYSDA: \u041a\u0430\u043a \u043c\u044b \u0432 \u0428\u0410\u0414\u0435 \u043f\u0435\u0440\u0435\u0438\u0437\u043e\u0431\u0440\u0435\u043b\u0438 \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0443\u044e \u0438\u0433\u0440\u0443 \u0413\u043e, \u0432\u044b\u043a\u0438\u043d\u0443\u0432 \u0438\u0437 \u043d\u0435\u0433\u043e \u0441\u0435\u0442\u043a\u0443<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>\u0412\u0441\u0435 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0413\u043e \u2014 \u0433\u043b\u0443\u0431\u043e\u043a\u0443\u044e, \u043c\u0435\u0434\u0438\u0442\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0438\u0433\u0440\u0443 \u043d\u0430 \u0434\u043e\u0441\u043a\u0435 19&#215;19. \u041a\u0430\u043c\u043d\u0438, \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f, \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438&#8230; \u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 <strong>\u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u0441\u0430\u043c\u0443 \u0441\u0435\u0442\u043a\u0443<\/strong> \u0438 <strong>\u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u043d\u0438 \u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e<\/strong> \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0434\u043e\u0441\u043a\u0438?<\/p>\n<p>\u041c\u044b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 YSDA (Yandex School of Data Analysis \u0438\u043b\u0438 \u0428\u043a\u043e\u043b\u0430 \u0410\u043d\u0430\u043b\u0438\u0437\u0430 \u0414\u0430\u043d\u043d\u044b\u0445, \u0428\u0410\u0414) \u0437\u0430\u0434\u0430\u043b\u0438\u0441\u044c \u044d\u0442\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0430\u0437\u0430\u0440\u0442\u043d\u043e, \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u043e \u0438, \u0447\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0434\u043b\u044f \u043d\u0430\u0441 \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u2014 \u0447\u0435\u0440\u0442\u043e\u0432\u0441\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ho\/s5\/uv\/hos5uvuhcvdteniq5ooccxagjie.png\" alt=\"\u041d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u0413\u043e \u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u043e\u0447\u043a\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u043f\u043b\u043e\u0449\u0430\u0434\u0438\" title=\"\u041d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u0413\u043e \u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u043e\u0447\u043a\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u043f\u043b\u043e\u0449\u0430\u0434\u0438\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/ho\/s5\/uv\/hos5uvuhcvdteniq5ooccxagjie.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/ho\/s5\/uv\/hos5uvuhcvdteniq5ooccxagjie.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u0413\u043e \u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u043e\u0447\u043a\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u043f\u043b\u043e\u0449\u0430\u0434\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u044d\u0442\u0443 \u0438\u0434\u0435\u044e \u043d\u0430 Python \u0438 Pygame, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0430\u043c\u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0438 \u043a\u0430\u043a \u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0447\u043a\u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u0434\u043e\u0441\u043a\u0443 \u0432 \u0436\u0438\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0431\u0438\u0442\u0432\u044b.<\/p>\n<h3>\u0414\u0435\u043c\u043e \u0432\u0438\u0434\u0435\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e <a href=\"https:\/\/www.youtube.com\/watch?v=ZOcsS9vKWsY\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0433\u0440\u044b \u0438 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u0432\u0438\u0434\u0435\u043e<\/a>.<\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 <a href=\"https:\/\/github.com\/Penchekrak\/goysda\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a> \u0432\u0441\u0435 \u0435\u0449\u0435 \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0438 \u0436\u0434\u0443\u0442 \u0432\u0430\u0448\u0438\u0445 \u0438\u0434\u0435\u0439, \u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c PR!<\/p>\n<h3>\u0427\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c? \u0418\u0434\u0435\u044f \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u0413\u043e<\/h3>\n<p><a href=\"https:\/\/ufgo.org\/Rules9x9\/Go%20Rules%209x9.htm\" rel=\"noopener noreferrer nofollow\">\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0413\u043e<\/a> \u2014 \u044d\u0442\u043e \u0438\u0433\u0440\u0430 \u043f\u0440\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u0442\u043e\u0447\u043a\u0430\u043c\u0438, \u043b\u0438\u043d\u0438\u044f\u043c\u0438 \u0438, \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435, \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438. \u041d\u043e \u0441\u0442\u0440\u043e\u0433\u0430\u044f \u0441\u0435\u0442\u043a\u0430 \u0434\u0438\u043a\u0442\u0443\u0435\u0442 \u0441\u0432\u043e\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0445\u043e\u0434\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/8m\/mj\/6z\/8mmj6zwo6zy9cy5ab8-68nlxxxy.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0433\u0440\u044b \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0413\u043e\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0433\u0440\u044b \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0413\u043e\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/8m\/mj\/6z\/8mmj6zwo6zy9cy5ab8-68nlxxxy.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/8m\/mj\/6z\/8mmj6zwo6zy9cy5ab8-68nlxxxy.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0433\u0440\u044b \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0413\u043e<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043d\u0430\u0448\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043d\u0435\u0442. \u041a\u0430\u043c\u0435\u043d\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043b\u044e\u0431\u0443\u044e \u0442\u043e\u0447\u043a\u0443. \u042d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u0435\u043d\u044f\u0435\u0442 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 \u0438\u0433\u0440\u044b. \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0438 &#171;\u0436\u0438\u0432\u044b\u043c\u0438&#187;. \u0412\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u0432\u043e\u0431\u043e\u0434 (\u0434\u0430\u043c\u044d) \u0432\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0435 \u043c\u044b\u0441\u043b\u0438\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u043c\u0438 \u0432\u043b\u0438\u044f\u043d\u0438\u044f. \u0412\u043c\u0435\u0441\u0442\u043e \u0447\u0435\u0442\u043a\u0438\u0445 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0439 \u2014 \u043f\u043b\u0430\u0432\u043d\u044b\u0435, \u043e\u0440\u0433\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u043e\u0440\u043c\u044b. \u0418 \u044d\u0442\u043e, \u043a\u0430\u043a \u043d\u0430\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0433\u0440\u0435 \u0430\u0437\u0430\u0440\u0442\u0430 \u0438 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/td\/kt\/2n\/tdkt2ngexu8cgdr6dfeorztlxdq.png\" alt=\"\u041f\u0430\u0440\u0442\u0438\u044f \u0432 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u0413\u043e. \u041d\u0430 \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0435 \u0446\u0432\u0435\u0442\u0430 \u0434\u043e\u0441\u043a\u0438 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u043d\u044c \u043d\u0435\u043b\u044c\u0437\u044f (\u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430)\" title=\"\u041f\u0430\u0440\u0442\u0438\u044f \u0432 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u0413\u043e. \u041d\u0430 \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0435 \u0446\u0432\u0435\u0442\u0430 \u0434\u043e\u0441\u043a\u0438 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u043d\u044c \u043d\u0435\u043b\u044c\u0437\u044f (\u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430)\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/td\/kt\/2n\/tdkt2ngexu8cgdr6dfeorztlxdq.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/td\/kt\/2n\/tdkt2ngexu8cgdr6dfeorztlxdq.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0430\u0440\u0442\u0438\u044f \u0432 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u0413\u043e. \u041d\u0430 \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0435 \u0446\u0432\u0435\u0442\u0430 \u0434\u043e\u0441\u043a\u0438 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u043d\u044c \u043d\u0435\u043b\u044c\u0437\u044f (\u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430)<\/figcaption><\/div>\n<\/figure>\n<h3>\u041a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438: 3 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430<\/h3>\n<p>\u041e\u0442\u043a\u0430\u0437\u0430\u0432\u0448\u0438\u0441\u044c \u043e\u0442 \u0441\u0435\u0442\u043a\u0438, \u043c\u044b, \u043f\u043e \u0441\u0443\u0442\u0438, \u0432\u044b\u043a\u0438\u043d\u0443\u043b\u0438 \u0442\u0440\u0438 \u0441\u0442\u043e\u043b\u043f\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0413\u043e: \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438, \u043f\u043e\u043d\u044f\u0442\u0438\u0435 &#171;\u0434\u044b\u0445\u0430\u043d\u0438\u044f&#187; (\u0434\u0430\u043c\u044d) \u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0438\u0445 \u0437\u0430\u043d\u043e\u0432\u043e, \u043d\u043e \u0443\u0436\u0435 \u0432 \u043c\u0438\u0440\u0435 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438.<\/p>\n<h4>1. &#171;\u041a\u0443\u0434\u0430 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u043d\u044c?&#187; \u2014 \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f (Snapping)<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong> \u0412 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043a\u0430\u043c\u043d\u0438 \u2014 \u044d\u0442\u043e \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438. \u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043a\u0430\u0441\u0430\u043b\u0438\u0441\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430, \u0430 \u043d\u0435 &#171;\u0437\u0430\u043b\u0435\u0437\u0430\u043b\u0438&#187; \u043e\u0434\u0438\u043d \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439?<\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/strong> \u041c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 &#171;\u0443\u043c\u043d\u044b\u0439&#187; \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u2014 \u043a\u0430\u043c\u0435\u043d\u044c \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0442\u0443\u0434\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u043e (\u0438\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c), \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u0449\u0435\u0442 \u043b\u0443\u0447\u0448\u0435\u0435 \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f &#171;\u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f&#187;.<\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e \u0442\u0430\u043a: \u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 &#171;\u043e\u0441\u043e\u0431\u044b\u0445&#187; \u0442\u043e\u0447\u0435\u043a-\u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u0430\u043c\u043d\u0435\u0439 \u0438 \u0433\u0440\u0430\u043d\u0438\u0446 \u0434\u043e\u0441\u043a\u0438, \u0433\u0434\u0435 \u043d\u043e\u0432\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c \u043c\u043e\u0433 \u0431\u044b \u0432\u0441\u0442\u0430\u0442\u044c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e &#171;\u0432\u043f\u0440\u0438\u0442\u0438\u0440\u043a\u0443&#187;. \u042d\u0442\u043e \u0442\u043e\u0447\u043a\u0438 \u043a\u0430\u0441\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043a\u0430\u043c\u043d\u0435\u0439, \u043a\u0430\u043c\u043d\u044f \u0438 \u043a\u0440\u0430\u044f, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0410 \u0437\u0430\u0442\u0435\u043c \u0438\u0437 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0443, \u0447\u0442\u043e \u0431\u043b\u0438\u0436\u0435 \u0432\u0441\u0435\u0433\u043e \u043a \u043a\u0443\u0440\u0441\u043e\u0440\u0443.<\/p>\n<blockquote>\n<p>\u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u0442\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438: \u043d\u0430\u0439\u0442\u0438 \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<\/blockquote>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/o7\/5i\/ji\/o75ijid-s0zqeykpwmtdzyehjzc.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/o7\/5i\/ji\/o75ijid-s0zqeykpwmtdzyehjzc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/o7\/5i\/ji\/o75ijid-s0zqeykpwmtdzyehjzc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430: \u043f\u043e\u0438\u0441\u043a \u0442\u043e\u0447\u0435\u043a \u043a\u0430\u0441\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043a\u0430\u043c\u043d\u0435\u0439<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># goysda\/utils.py  def compute_double_touch_points(game_state, game_config, snap_color=None):     \"\"\"     Returns all possible placements where the point would touch two other stones simultaneously.     \"\"\"     r = game_config['stone_radius']     doubletouch_points = []     for s1 in game_state.placed_stones:         for s2 in game_state.placed_stones:             # ... \u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0446\u0432\u0435\u0442 \u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u043c\u043d\u0435\u0439 ...              # v is the s1 -&gt; s2 vector             vx = x2 - x1             vy = y2 - y1              # \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u043c\u043d\u044f\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 4 \u0440\u0430\u0434\u0438\u0443\u0441\u043e\u0432, \u043e\u043d\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043a\u043e\u0441\u043d\u0443\u0442\u044c\u0441\u044f \u0442\u0440\u0435\u0442\u044c\u0438\u043c             if norm(vx, vy) &gt; 16 * r ** 2:                 continue              # ... \u0442\u0443\u0442 \u043c\u0430\u0433\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u0435\u043a ...             # ... \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0440\u0430\u0434\u0438\u0443\u0441\u043e\u043c 2R ...          # ...     return [s for (s, intersect) in zip(doubletouch_points, is_ok) if not intersect] <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>2. &#171;\u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0433\u0440\u0443\u043f\u043f\u0430 \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u0430?&#187; \u2014 \u0413\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 &#171;\u0434\u044b\u0445\u0430\u043d\u0438\u0435&#187;<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong> \u0423 \u0433\u0440\u0443\u043f\u043f\u044b \u043a\u0430\u043c\u043d\u0435\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u043f\u0443\u0441\u0442\u044b\u0445 \u043a\u043b\u0435\u0442\u043e\u043a (\u0434\u0430\u043c\u044d). \u041a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0430 \u0438 &#171;\u043c\u0435\u0440\u0442\u0432\u0430&#187;?<\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/strong> \u041c\u044b \u0432\u0432\u0435\u043b\u0438 \u043d\u043e\u0432\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435. &#171;\u0423 \u0433\u0440\u0443\u043f\u043f\u044b \u0435\u0441\u0442\u044c \u0434\u044b\u0445\u0430\u043d\u0438\u0435 (\u0434\u0430\u043c\u0435), \u0435\u0441\u043b\u0438 \u043d\u0430 \u0432\u0441\u0435\u0439 \u0434\u043e\u0441\u043a\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430 \u0442\u043e\u0447\u043a\u0430, \u043a\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c \u0442\u043e\u0433\u043e \u0436\u0435 \u0446\u0432\u0435\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043a\u043e\u0441\u043d\u0443\u043b\u0441\u044f \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b&#187;.<\/p>\n<p>\u041d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0445\u043e\u0434\u0430 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li>\n<p>\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u0430\u043c\u043d\u0438 \u043d\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b (\u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0432 \u0448\u0438\u0440\u0438\u043d\u0443 \u043f\u043e \u0433\u0440\u0430\u0444\u0443 \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u0430).<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 <code>group_has_dame<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u043a\u0430\u0441\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b (\u043a\u0430\u043a \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 snapping) \u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0443, \u043a\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e &#171;\u0432\u0434\u043e\u0445\u043d\u0443\u0442\u044c&#187; \u043d\u043e\u0432\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u2014 \u0433\u0440\u0443\u043f\u043f\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f &#171;\u043c\u0435\u0440\u0442\u0432\u043e\u0439&#187; \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0434\u043e\u0441\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ml\/b4\/gw\/mlb4gwk2kya6ouwebq-xfx1qc3w.png\" alt=\"\u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0434\u0430\u043c\u0435\" title=\"\u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0434\u0430\u043c\u0435\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/ml\/b4\/gw\/mlb4gwk2kya6ouwebq-xfx1qc3w.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/ml\/b4\/gw\/mlb4gwk2kya6ouwebq-xfx1qc3w.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0434\u0430\u043c\u0435<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 &#8216;\u0436\u0438\u0437\u043d\u0438&#8217; \u0433\u0440\u0443\u043f\u043f\u044b<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># goysda\/utils.py  def kill_groups_of_color(color, game_state, game_config):     # \u0420\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u043c\u043d\u0438 \u043d\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b     groups = split_stones_by_groups(game_state, game_config)     stones_to_kill = []      # \u0414\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0442\u043e\u0447\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u043a\u0430\u0441\u0430\u043d\u0438\u044f     precomputed_doubletouch_points = compute_double_touch_points(game_state, game_config, None)      for group in groups:         # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430         if game_state.placed_stones[group[0]].color == color:             # \u0415\u0441\u043b\u0438 \u0443 \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0435\u0442 \"\u0434\u044b\u0445\u0430\u043d\u0438\u044f\" (\u0434\u0430\u043c\u0435)...             if not group_has_dame(group, game_state, game_config, precomputed_doubletouch_points):                 # ...\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u043c\u043d\u0438 \u0438\u0437 \u043d\u0435\u0435 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435                 stones_to_kill += group          kill_group(stones_to_kill, game_state, game_config)  def group_has_dame(group, game_state, game_config, precomputed_doubletouch_points=None):     \"\"\"     \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0435\u0441\u0442\u044c \u043b\u0438 \u0443 \u0433\u0440\u0443\u043f\u043f\u044b \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430 \u0442\u043e\u0447\u043a\u0430, \u043a\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c     \u043a\u0430\u043c\u0435\u043d\u044c \u0442\u043e\u0433\u043e \u0436\u0435 \u0446\u0432\u0435\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043a\u043e\u0441\u043d\u0443\u043b\u0441\u044f \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b.     \"\"\"     r = game_config['stone_radius']          # \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u043c\u043d\u0438 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435     for i in group:         s = game_state.placed_stones[i]         x0, y0 = s.x, s.y         # \u0418\u0449\u0435\u043c \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \"\u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f\" \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u0430\u043c\u043d\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u0435         x1, y1 = compute_closest_snap_position(x0, y0, game_state, game_config, snap_color=None, precomputed_doubletouch_points=precomputed_doubletouch_points)                  # \u0415\u0441\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u043d\u044c \u0432\u043f\u043b\u043e\u0442\u043d\u0443\u044e (\u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u043f\u043b\u043e\u0442\u043d\u0443\u044e) \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u043a\u0430\u043c\u043d\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u044b,         # \u0437\u043d\u0430\u0447\u0438\u0442 \"\u0434\u044b\u0445\u0430\u043d\u0438\u0435\" \u0435\u0441\u0442\u044c.         if norm(x1 - x0, y1 - y0) &lt;= 4 * r ** 2 + 10**(-5):             return True # \u041d\u0430\u0448\u043b\u0438! \u0413\u0440\u0443\u043f\u043f\u0430 \u0436\u0438\u0432\u0430.                  return False # \u041d\u0435 \u043d\u0430\u0448\u043b\u0438 \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438. \u0413\u0440\u0443\u043f\u043f\u0430 \u043c\u0435\u0440\u0442\u0432\u0430. <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441\u0430\u043c\u043e\u0443\u0431\u0438\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0445\u043e\u0434\u043e\u0432: \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0445\u043e\u0434\u0430 \u0432\u0430\u0448\u0430 \u0436\u0435 \u0433\u0440\u0443\u043f\u043f\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 &#171;\u0434\u044b\u0445\u0430\u043d\u0438\u044f&#187;, \u043e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<h4>3. &#171;\u0427\u044c\u044f \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u044f?&#187; \u2014 \u041c\u0430\u0433\u0438\u044f \u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong> \u041a\u0430\u043a \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0447\u043a\u0438? \u0414\u0435\u043b\u0438\u0442\u044c \u0434\u043e\u0441\u043a\u0443 \u043d\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u0438 \u2014 \u0431\u0435\u0437\u0443\u043c\u0438\u0435. \u041d\u0443\u0436\u0435\u043d \u0431\u044b\u043b \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u044f\u0449\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431.<\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/strong> \u041d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0448\u043b\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <code>shapely<\/code> \u0438 <strong>\u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e<\/strong>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u043e\u0447\u0435\u043a (\u043d\u0430\u0448\u0438\u0445 \u043a\u0430\u043c\u043d\u0435\u0439) \u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u043d\u0430 \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u0442\u0430\u043a, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432 \u0440\u0435\u0433\u0438\u043e\u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u043b\u0438\u0436\u0435 \u043a &#171;\u0441\u0432\u043e\u0435\u043c\u0443&#187; \u043a\u0430\u043c\u043d\u044e, \u0447\u0435\u043c \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u042d\u0442\u043e \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f &#171;\u0437\u043e\u043d \u0432\u043b\u0438\u044f\u043d\u0438\u044f&#187;!<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0445\u043e\u0434\u0430 \u043c\u044b:<\/p>\n<ol>\n<li>\n<p>\u0421\u0442\u0440\u043e\u0438\u043c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u0430\u043c\u043d\u0435\u0439 \u043d\u0430 \u0434\u043e\u0441\u043a\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430, \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0435\u0433\u043e \u043a\u0430\u043c\u043d\u044f\u043c \u0447\u0435\u0440\u043d\u043e\u0433\u043e \u0438 \u0431\u0435\u043b\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u043e\u0447\u043d\u044b\u0439 \u0441\u0447\u0435\u0442 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u042d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0447\u0435\u0441\u0442\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0447\u043a\u0438, \u043d\u043e \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0438\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442, \u043a\u043e\u0433\u0434\u0430 \u0437\u043e\u043d\u044b \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043a\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0445\u043e\u0434\u0430.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yn\/_a\/2t\/yn_a2tvborn2woqyqrslnxtl7p4.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0447\u043a\u0438 \u043f\u043e \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0447\u043a\u0438 \u043f\u043e \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/yn\/_a\/2t\/yn_a2tvborn2woqyqrslnxtl7p4.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/yn\/_a\/2t\/yn_a2tvborn2woqyqrslnxtl7p4.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0447\u043a\u0438 \u043f\u043e \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430: \u0440\u0430\u0441\u0447\u0435\u0442 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># goysda\/game_state.py  def calculate_voronoi_polygons(self):     # \u0411\u0435\u0440\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u043c\u043d\u0438 \u043d\u0430 \u0434\u043e\u0441\u043a\u0435 + \"\u043a\u0430\u043c\u0435\u043d\u044c-\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443\" \u043f\u043e\u0434 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c     stones_list = self.placed_and_suggestion_stones()          # \u0421\u0442\u0440\u043e\u0438\u043c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e shapely.     # extend_to=self.board \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u0442 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u044b \u043f\u043e \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u0434\u043e\u0441\u043a\u0438.     voronoi_polygons = shapely.voronoi_polygons(         geometry=shapely.MultiPoint([[stone.x, stone.y] for stone in stones_list]),         extend_to=self.board,         ordered=True,     ).geoms          self.voronoi_polygons = [shapely.intersection(elem, self.board) for elem in voronoi_polygons]          # \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u044e     for i in range(len(self.colors)):         # ... \u043b\u043e\u0433\u0438\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u0430 ...                  # \u0421\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u043e\u0432, \"\u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445\" \u043a\u0430\u043c\u043d\u044f\u043c \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430         area_i = sum(elem.area * (stone.color in player_colors) for elem, stone in zip(self.voronoi_polygons, stones_list))                  # \u041d\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043d\u0430 \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043a\u0430\u043c\u043d\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0447\u0435\u0442 \u0432 \"\u043a\u0430\u043c\u043d\u044f\u0445\"         self.territory[i] = round(area_i \/ (2 * math.pi * self.config[\"stone_radius\"] ** 2), 2) <\/code><\/pre>\n<\/div>\n<\/details>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043f\u043e &#171;\u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044e&#187; \u0413\u043e \u043e\u0442 \u0441\u0435\u0442\u043a\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043b\u043e\u043d, \u0430, \u043a\u0430\u043a \u043d\u0430\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u0433\u0440\u0430 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0442\u0430\u043a\u0442\u0438\u043a\u0430\u043c\u0438 \u0438 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435\u043c. \u0413\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0442\u043a\u0440\u044b\u043b \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0440\u0435\u0448\u0430\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u043e \u043e\u0434\u043d\u043e \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435.<\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u0440\u044b\u0442, \u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u043b\u044e\u0431\u043e\u043c\u0443 \u0444\u0438\u0434\u0431\u0435\u043a\u0443. \u041f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c, <a href=\"https:\/\/github.com\/Penchekrak\/goysda\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u043a\u043e\u0434 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0438\u0434\u0435\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 GitHub<\/a>.<\/p>\n<hr\/>\n<h3>\u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435?<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0448\u0430\u0433\u0438 &#8212; [1]\u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0438\u0433\u0440\u0443 \u043d\u0430 JS, \u0447\u0442\u043e\u0431\u044b \u0431\u0435\u0437 \u043f\u0440\u0438\u0441\u0435\u0434\u0430\u043d\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043e\u043d\u043b\u0430\u0439\u043d \u0432 web. [2]\u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0435\u0449\u0435 \u043d\u0430\u0434 UI \u0438 [3]\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0433\u0440\u0430\u0442\u044c \u0434\u0432\u0443\u043c \u043b\u044e\u0434\u044f\u043c \u043f\u043e \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0443\u0442\u0438\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b: \u0432\u0435\u0440\u0441\u043a\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u043b <a href=\"https:\/\/cursor.com\/\" rel=\"noopener noreferrer nofollow\">Cursor<\/a>. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f [1] \u0438 [2].<\/p>\n<p>\u0412\u0441\u0435 \u0442\u0430\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e AI \u0441\u0440\u0435\u0437\u0430\u0442\u044c \u0443\u0433\u043b\u044b, \u043d\u043e <strong>\u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0433\u0434\u0435 \u0438 \u043a\u0430\u043a<\/strong>. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0439 \u043d\u0430\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c Telegram-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e <a href=\"https:\/\/t.me\/+EYjFfrSgXcA2YmUy\" rel=\"noopener noreferrer nofollow\">@datafeeling<\/a><\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/926338\/\"> https:\/\/habr.com\/ru\/articles\/926338\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>\u0412\u0441\u0435 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0413\u043e \u2014 \u0433\u043b\u0443\u0431\u043e\u043a\u0443\u044e, \u043c\u0435\u0434\u0438\u0442\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0438\u0433\u0440\u0443 \u043d\u0430 \u0434\u043e\u0441\u043a\u0435 19&#215;19. \u041a\u0430\u043c\u043d\u0438, \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f, \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438&#8230; \u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 <strong>\u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u0441\u0430\u043c\u0443 \u0441\u0435\u0442\u043a\u0443<\/strong> \u0438 <strong>\u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u043d\u0438 \u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e<\/strong> \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0434\u043e\u0441\u043a\u0438?<\/p>\n<p>\u041c\u044b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 YSDA (Yandex School of Data Analysis \u0438\u043b\u0438 \u0428\u043a\u043e\u043b\u0430 \u0410\u043d\u0430\u043b\u0438\u0437\u0430 \u0414\u0430\u043d\u043d\u044b\u0445, \u0428\u0410\u0414) \u0437\u0430\u0434\u0430\u043b\u0438\u0441\u044c \u044d\u0442\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0430\u0437\u0430\u0440\u0442\u043d\u043e, \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u043e \u0438, \u0447\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0434\u043b\u044f \u043d\u0430\u0441 \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u2014 \u0447\u0435\u0440\u0442\u043e\u0432\u0441\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432.<\/p>\n<figure class=\"\">\n<div><figcaption>\u041d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u0413\u043e \u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u043e\u0447\u043a\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u043f\u043b\u043e\u0449\u0430\u0434\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u044d\u0442\u0443 \u0438\u0434\u0435\u044e \u043d\u0430 Python \u0438 Pygame, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0430\u043c\u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0438 \u043a\u0430\u043a \u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0447\u043a\u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u0434\u043e\u0441\u043a\u0443 \u0432 \u0436\u0438\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0431\u0438\u0442\u0432\u044b.<\/p>\n<h3>\u0414\u0435\u043c\u043e \u0432\u0438\u0434\u0435\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e <a href=\"https:\/\/www.youtube.com\/watch?v=ZOcsS9vKWsY\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0433\u0440\u044b \u0438 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u0432\u0438\u0434\u0435\u043e<\/a>.<\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 <a href=\"https:\/\/github.com\/Penchekrak\/goysda\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a> \u0432\u0441\u0435 \u0435\u0449\u0435 \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0438 \u0436\u0434\u0443\u0442 \u0432\u0430\u0448\u0438\u0445 \u0438\u0434\u0435\u0439, \u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c PR!<\/p>\n<h3>\u0427\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c? \u0418\u0434\u0435\u044f \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u0413\u043e<\/h3>\n<p><a href=\"https:\/\/ufgo.org\/Rules9x9\/Go%20Rules%209x9.htm\" rel=\"noopener noreferrer nofollow\">\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0413\u043e<\/a> \u2014 \u044d\u0442\u043e \u0438\u0433\u0440\u0430 \u043f\u0440\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u0442\u043e\u0447\u043a\u0430\u043c\u0438, \u043b\u0438\u043d\u0438\u044f\u043c\u0438 \u0438, \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435, \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438. \u041d\u043e \u0441\u0442\u0440\u043e\u0433\u0430\u044f \u0441\u0435\u0442\u043a\u0430 \u0434\u0438\u043a\u0442\u0443\u0435\u0442 \u0441\u0432\u043e\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0445\u043e\u0434\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0433\u0440\u044b \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0413\u043e<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043d\u0430\u0448\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043d\u0435\u0442. \u041a\u0430\u043c\u0435\u043d\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043b\u044e\u0431\u0443\u044e \u0442\u043e\u0447\u043a\u0443. \u042d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u0435\u043d\u044f\u0435\u0442 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 \u0438\u0433\u0440\u044b. \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0438 &#171;\u0436\u0438\u0432\u044b\u043c\u0438&#187;. \u0412\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u0432\u043e\u0431\u043e\u0434 (\u0434\u0430\u043c\u044d) \u0432\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0435 \u043c\u044b\u0441\u043b\u0438\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u043c\u0438 \u0432\u043b\u0438\u044f\u043d\u0438\u044f. \u0412\u043c\u0435\u0441\u0442\u043e \u0447\u0435\u0442\u043a\u0438\u0445 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0439 \u2014 \u043f\u043b\u0430\u0432\u043d\u044b\u0435, \u043e\u0440\u0433\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u043e\u0440\u043c\u044b. \u0418 \u044d\u0442\u043e, \u043a\u0430\u043a \u043d\u0430\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0433\u0440\u0435 \u0430\u0437\u0430\u0440\u0442\u0430 \u0438 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438.<\/p>\n<figure class=\"\">\n<div><figcaption>\u041f\u0430\u0440\u0442\u0438\u044f \u0432 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u0413\u043e. \u041d\u0430 \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0435 \u0446\u0432\u0435\u0442\u0430 \u0434\u043e\u0441\u043a\u0438 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u043d\u044c \u043d\u0435\u043b\u044c\u0437\u044f (\u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430)<\/figcaption><\/div>\n<\/figure>\n<h3>\u041a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438: 3 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430<\/h3>\n<p>\u041e\u0442\u043a\u0430\u0437\u0430\u0432\u0448\u0438\u0441\u044c \u043e\u0442 \u0441\u0435\u0442\u043a\u0438, \u043c\u044b, \u043f\u043e \u0441\u0443\u0442\u0438, \u0432\u044b\u043a\u0438\u043d\u0443\u043b\u0438 \u0442\u0440\u0438 \u0441\u0442\u043e\u043b\u043f\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0413\u043e: \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438, \u043f\u043e\u043d\u044f\u0442\u0438\u0435 &#171;\u0434\u044b\u0445\u0430\u043d\u0438\u044f&#187; (\u0434\u0430\u043c\u044d) \u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0438\u0445 \u0437\u0430\u043d\u043e\u0432\u043e, \u043d\u043e \u0443\u0436\u0435 \u0432 \u043c\u0438\u0440\u0435 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438.<\/p>\n<h4>1. &#171;\u041a\u0443\u0434\u0430 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u043d\u044c?&#187; \u2014 \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f (Snapping)<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong> \u0412 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043a\u0430\u043c\u043d\u0438 \u2014 \u044d\u0442\u043e \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438. \u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043a\u0430\u0441\u0430\u043b\u0438\u0441\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430, \u0430 \u043d\u0435 &#171;\u0437\u0430\u043b\u0435\u0437\u0430\u043b\u0438&#187; \u043e\u0434\u0438\u043d \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439?<\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/strong> \u041c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 &#171;\u0443\u043c\u043d\u044b\u0439&#187; \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u2014 \u043a\u0430\u043c\u0435\u043d\u044c \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0442\u0443\u0434\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u043e (\u0438\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c), \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u0449\u0435\u0442 \u043b\u0443\u0447\u0448\u0435\u0435 \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f &#171;\u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f&#187;.<\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e \u0442\u0430\u043a: \u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 &#171;\u043e\u0441\u043e\u0431\u044b\u0445&#187; \u0442\u043e\u0447\u0435\u043a-\u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u0430\u043c\u043d\u0435\u0439 \u0438 \u0433\u0440\u0430\u043d\u0438\u0446 \u0434\u043e\u0441\u043a\u0438, \u0433\u0434\u0435 \u043d\u043e\u0432\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c \u043c\u043e\u0433 \u0431\u044b \u0432\u0441\u0442\u0430\u0442\u044c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e &#171;\u0432\u043f\u0440\u0438\u0442\u0438\u0440\u043a\u0443&#187;. \u042d\u0442\u043e \u0442\u043e\u0447\u043a\u0438 \u043a\u0430\u0441\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043a\u0430\u043c\u043d\u0435\u0439, \u043a\u0430\u043c\u043d\u044f \u0438 \u043a\u0440\u0430\u044f, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0410 \u0437\u0430\u0442\u0435\u043c \u0438\u0437 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0443, \u0447\u0442\u043e \u0431\u043b\u0438\u0436\u0435 \u0432\u0441\u0435\u0433\u043e \u043a \u043a\u0443\u0440\u0441\u043e\u0440\u0443.<\/p>\n<blockquote>\n<p>\u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u0442\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438: \u043d\u0430\u0439\u0442\u0438 \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<\/blockquote>\n<figure class=\"\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430: \u043f\u043e\u0438\u0441\u043a \u0442\u043e\u0447\u0435\u043a \u043a\u0430\u0441\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043a\u0430\u043c\u043d\u0435\u0439<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># goysda\/utils.py  def compute_double_touch_points(game_state, game_config, snap_color=None):     \"\"\"     Returns all possible placements where the point would touch two other stones simultaneously.     \"\"\"     r = game_config['stone_radius']     doubletouch_points = []     for s1 in game_state.placed_stones:         for s2 in game_state.placed_stones:             # ... \u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0446\u0432\u0435\u0442 \u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u043c\u043d\u0435\u0439 ...              # v is the s1 -&gt; s2 vector             vx = x2 - x1             vy = y2 - y1              # \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u043c\u043d\u044f\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 4 \u0440\u0430\u0434\u0438\u0443\u0441\u043e\u0432, \u043e\u043d\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043a\u043e\u0441\u043d\u0443\u0442\u044c\u0441\u044f \u0442\u0440\u0435\u0442\u044c\u0438\u043c             if norm(vx, vy) &gt; 16 * r ** 2:                 continue              # ... \u0442\u0443\u0442 \u043c\u0430\u0433\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u0435\u043a ...             # ... \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0440\u0430\u0434\u0438\u0443\u0441\u043e\u043c 2R ...          # ...     return [s for (s, intersect) in zip(doubletouch_points, is_ok) if not intersect] <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>2. &#171;\u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0433\u0440\u0443\u043f\u043f\u0430 \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u0430?&#187; \u2014 \u0413\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 &#171;\u0434\u044b\u0445\u0430\u043d\u0438\u0435&#187;<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong> \u0423 \u0433\u0440\u0443\u043f\u043f\u044b \u043a\u0430\u043c\u043d\u0435\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u043f\u0443\u0441\u0442\u044b\u0445 \u043a\u043b\u0435\u0442\u043e\u043a (\u0434\u0430\u043c\u044d). \u041a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0430 \u0438 &#171;\u043c\u0435\u0440\u0442\u0432\u0430&#187;?<\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/strong> \u041c\u044b \u0432\u0432\u0435\u043b\u0438 \u043d\u043e\u0432\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435. &#171;\u0423 \u0433\u0440\u0443\u043f\u043f\u044b \u0435\u0441\u0442\u044c \u0434\u044b\u0445\u0430\u043d\u0438\u0435 (\u0434\u0430\u043c\u0435), \u0435\u0441\u043b\u0438 \u043d\u0430 \u0432\u0441\u0435\u0439 \u0434\u043e\u0441\u043a\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430 \u0442\u043e\u0447\u043a\u0430, \u043a\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c \u0442\u043e\u0433\u043e \u0436\u0435 \u0446\u0432\u0435\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043a\u043e\u0441\u043d\u0443\u043b\u0441\u044f \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b&#187;.<\/p>\n<p>\u041d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0445\u043e\u0434\u0430 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li>\n<p>\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u0430\u043c\u043d\u0438 \u043d\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b (\u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0432 \u0448\u0438\u0440\u0438\u043d\u0443 \u043f\u043e \u0433\u0440\u0430\u0444\u0443 \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u0430).<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 <code>group_has_dame<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u043a\u0430\u0441\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b (\u043a\u0430\u043a \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 snapping) \u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0443, \u043a\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e &#171;\u0432\u0434\u043e\u0445\u043d\u0443\u0442\u044c&#187; \u043d\u043e\u0432\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u2014 \u0433\u0440\u0443\u043f\u043f\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f &#171;\u043c\u0435\u0440\u0442\u0432\u043e\u0439&#187; \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0434\u043e\u0441\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"\">\n<div><figcaption>\u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0434\u0430\u043c\u0435<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 &#8216;\u0436\u0438\u0437\u043d\u0438&#8217; \u0433\u0440\u0443\u043f\u043f\u044b<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># goysda\/utils.py  def kill_groups_of_color(color, game_state, game_config):     # \u0420\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u043c\u043d\u0438 \u043d\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b     groups = split_stones_by_groups(game_state, game_config)     stones_to_kill = []      # \u0414\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0442\u043e\u0447\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u043a\u0430\u0441\u0430\u043d\u0438\u044f     precomputed_doubletouch_points = compute_double_touch_points(game_state, game_config, None)      for group in groups:         # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430         if game_state.placed_stones[group[0]].color == color:             # \u0415\u0441\u043b\u0438 \u0443 \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0435\u0442 \"\u0434\u044b\u0445\u0430\u043d\u0438\u044f\" (\u0434\u0430\u043c\u0435)...             if not group_has_dame(group, game_state, game_config, precomputed_doubletouch_points):                 # ...\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u043c\u043d\u0438 \u0438\u0437 \u043d\u0435\u0435 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435                 stones_to_kill += group          kill_group(stones_to_kill, game_state, game_config)  def group_has_dame(group, game_state, game_config, precomputed_doubletouch_points=None):     \"\"\"     \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0435\u0441\u0442\u044c \u043b\u0438 \u0443 \u0433\u0440\u0443\u043f\u043f\u044b \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430 \u0442\u043e\u0447\u043a\u0430, \u043a\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c     \u043a\u0430\u043c\u0435\u043d\u044c \u0442\u043e\u0433\u043e \u0436\u0435 \u0446\u0432\u0435\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043a\u043e\u0441\u043d\u0443\u043b\u0441\u044f \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b.     \"\"\"     r = game_config['stone_radius']          # \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u043c\u043d\u0438 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435     for i in group:         s = game_state.placed_stones[i]         x0, y0 = s.x, s.y         # \u0418\u0449\u0435\u043c \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \"\u043f\u0440\u0438\u043b\u0438\u043f\u0430\u043d\u0438\u044f\" \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u0430\u043c\u043d\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u0435         x1, y1 = compute_closest_snap_position(x0, y0, game_state, game_config, snap_color=None, precomputed_doubletouch_points=precomputed_doubletouch_points)                  # \u0415\u0441\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u043d\u044c \u0432\u043f\u043b\u043e\u0442\u043d\u0443\u044e (\u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u043f\u043b\u043e\u0442\u043d\u0443\u044e) \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u043a\u0430\u043c\u043d\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u044b,         # \u0437\u043d\u0430\u0447\u0438\u0442 \"\u0434\u044b\u0445\u0430\u043d\u0438\u0435\" \u0435\u0441\u0442\u044c.         if norm(x1 - x0, y1 - y0) &lt;= 4 * r ** 2 + 10**(-5):             return True # \u041d\u0430\u0448\u043b\u0438! \u0413\u0440\u0443\u043f\u043f\u0430 \u0436\u0438\u0432\u0430.                  return False # \u041d\u0435 \u043d\u0430\u0448\u043b\u0438 \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438. \u0413\u0440\u0443\u043f\u043f\u0430 \u043c\u0435\u0440\u0442\u0432\u0430. <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441\u0430\u043c\u043e\u0443\u0431\u0438\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0445\u043e\u0434\u043e\u0432: \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0445\u043e\u0434\u0430 \u0432\u0430\u0448\u0430 \u0436\u0435 \u0433\u0440\u0443\u043f\u043f\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 &#171;\u0434\u044b\u0445\u0430\u043d\u0438\u044f&#187;, \u043e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<h4>3. &#171;\u0427\u044c\u044f \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u044f?&#187; \u2014 \u041c\u0430\u0433\u0438\u044f \u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e<\/h4>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/strong> \u041a\u0430\u043a \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0447\u043a\u0438? \u0414\u0435\u043b\u0438\u0442\u044c \u0434\u043e\u0441\u043a\u0443 \u043d\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u0438 \u2014 \u0431\u0435\u0437\u0443\u043c\u0438\u0435. \u041d\u0443\u0436\u0435\u043d \u0431\u044b\u043b \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u044f\u0449\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431.<\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/strong> \u041d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0448\u043b\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <code>shapely<\/code> \u0438 <strong>\u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e<\/strong>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u043e\u0447\u0435\u043a (\u043d\u0430\u0448\u0438\u0445 \u043a\u0430\u043c\u043d\u0435\u0439) \u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u043d\u0430 \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u0442\u0430\u043a, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432 \u0440\u0435\u0433\u0438\u043e\u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u043b\u0438\u0436\u0435 \u043a &#171;\u0441\u0432\u043e\u0435\u043c\u0443&#187; \u043a\u0430\u043c\u043d\u044e, \u0447\u0435\u043c \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u042d\u0442\u043e \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f &#171;\u0437\u043e\u043d \u0432\u043b\u0438\u044f\u043d\u0438\u044f&#187;!<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0445\u043e\u0434\u0430 \u043c\u044b:<\/p>\n<ol>\n<li>\n<p>\u0421\u0442\u0440\u043e\u0438\u043c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u0430\u043c\u043d\u0435\u0439 \u043d\u0430 \u0434\u043e\u0441\u043a\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430, \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0435\u0433\u043e \u043a\u0430\u043c\u043d\u044f\u043c \u0447\u0435\u0440\u043d\u043e\u0433\u043e \u0438 \u0431\u0435\u043b\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u043e\u0447\u043d\u044b\u0439 \u0441\u0447\u0435\u0442 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u042d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0447\u0435\u0441\u0442\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0447\u043a\u0438, \u043d\u043e \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0438\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442, \u043a\u043e\u0433\u0434\u0430 \u0437\u043e\u043d\u044b \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043a\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0445\u043e\u0434\u0430.<\/p>\n<figure class=\"\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0447\u043a\u0438 \u043f\u043e \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430: \u0440\u0430\u0441\u0447\u0435\u0442 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># goysda\/game_state.py  def calculate_voronoi_polygons(self):     # \u0411\u0435\u0440\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u043c\u043d\u0438 \u043d\u0430 \u0434\u043e\u0441\u043a\u0435 + \"\u043a\u0430\u043c\u0435\u043d\u044c-\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443\" \u043f\u043e\u0434 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c     stones_list = self.placed_and_suggestion_stones()          # \u0421\u0442\u0440\u043e\u0438\u043c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0412\u043e\u0440\u043e\u043d\u043e\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e shapely.     # extend_to=self.board \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u0442 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u044b \u043f\u043e \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u0434\u043e\u0441\u043a\u0438.     voronoi_polygons = shapely.voronoi_polygons(         geometry=shapely.MultiPoint([[stone.x, stone.y] for stone in stones_list]),         extend_to=self.board,         ordered=True,     ).geoms          self.voronoi_polygons = [shapely.intersection(elem, self.board) for elem in voronoi_polygons]          # \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u044e     for i in range(len(self.colors)):         # ... \u043b\u043e\u0433\u0438\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u0430 ...                  # \u0421\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u043e\u0432, \"\u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445\" \u043a\u0430\u043c\u043d\u044f\u043c \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430         area_i = sum(elem.area * (stone.color in player_colors) for elem, stone in zip(self.voronoi_polygons, stones_list))                  # \u041d\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043d\u0430 \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043a\u0430\u043c\u043d\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0447\u0435\u0442 \u0432 \"\u043a\u0430\u043c\u043d\u044f\u0445\"         self.territory[i] = round(area_i \/ (2 * math.pi * self.config[\"stone_radius\"] ** 2), 2) <\/code><\/pre>\n<\/div>\n<\/details>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043f\u043e &#171;\u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044e&#187; \u0413\u043e \u043e\u0442 \u0441\u0435\u0442\u043a\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043b\u043e\u043d, \u0430, \u043a\u0430\u043a \u043d\u0430\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u0433\u0440\u0430 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0442\u0430\u043a\u0442\u0438\u043a\u0430\u043c\u0438 \u0438 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435\u043c. \u0413\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0442\u043a\u0440\u044b\u043b \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0440\u0435\u0448\u0430\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u043e \u043e\u0434\u043d\u043e \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435.<\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u0440\u044b\u0442, \u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u043b\u044e\u0431\u043e\u043c\u0443 \u0444\u0438\u0434\u0431\u0435\u043a\u0443. \u041f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c, <a href=\"https:\/\/github.com\/Penchekrak\/goysda\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u043a\u043e\u0434 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0438\u0434\u0435\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 GitHub<\/a>.<\/p>\n<hr\/>\n<h3>\u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435?<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0448\u0430\u0433\u0438 &#8212; [1]\u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0438\u0433\u0440\u0443 \u043d\u0430 JS, \u0447\u0442\u043e\u0431\u044b \u0431\u0435\u0437 \u043f\u0440\u0438\u0441\u0435\u0434\u0430\u043d\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043e\u043d\u043b\u0430\u0439\u043d \u0432 web. [2]\u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0435\u0449\u0435 \u043d\u0430\u0434 UI \u0438 [3]\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0433\u0440\u0430\u0442\u044c \u0434\u0432\u0443\u043c \u043b\u044e\u0434\u044f\u043c \u043f\u043e \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0443\u0442\u0438\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b: \u0432\u0435\u0440\u0441\u043a\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u043b <a href=\"https:\/\/cursor.com\/\" rel=\"noopener noreferrer nofollow\">Cursor<\/a>. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f [1] \u0438 [2].<\/p>\n<p>\u0412\u0441\u0435 \u0442\u0430\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e AI \u0441\u0440\u0435\u0437\u0430\u0442\u044c \u0443\u0433\u043b\u044b, \u043d\u043e <strong>\u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0433\u0434\u0435 \u0438 \u043a\u0430\u043a<\/strong>. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0439 \u043d\u0430\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c Telegram-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e <a href=\"https:\/\/t.me\/+EYjFfrSgXcA2YmUy\" rel=\"noopener noreferrer nofollow\">@datafeeling<\/a><\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/926338\/\"> https:\/\/habr.com\/ru\/articles\/926338\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-466591","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/466591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=466591"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/466591\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=466591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=466591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=466591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}