{"id":357649,"date":"2024-05-20T23:55:13","date_gmt":"2024-05-20T23:55:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=357649"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=357649","title":{"rendered":"<span>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u0434\u043b\u044f \u0438\u0433\u0440\u044b \u0411\u0430\u0448\u0435 \u0431\u0435\u0437 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439<\/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>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043f\u0440\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043e\u0434\u043d\u043e \u0438\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043d\u044f\u0442\u0438\u044f: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443 \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439. \u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430. <\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432) \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0434\u043b\u0438\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u0433\u043e \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445; \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043d\u0430 \u0441\u043b\u0430\u0431\u044b\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432\u044b\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u0431\u044a\u0451\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0441\u0443\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u0434\u043b\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u0433\u0440\u044b \u0411\u0430\u0448\u0435 (\u043d\u0430\u0437\u0432\u0430\u043d\u0430 \u0432 \u0447\u0435\u0441\u0442\u044c \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u044d\u0442\u0430 \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0411\u0430\u0448\u0435 \u0434\u0435 \u041c\u0435\u0437\u0438\u0440\u0438\u0430\u043a\u0430).<\/p>\n<h2>\u0421\u0443\u0442\u044c \u0438\u0433\u0440\u044b \u0411\u0430\u0448\u0435 <\/h2>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043f\u0440\u043e \u0438\u0433\u0440\u0443: \u0434\u0432\u0430 \u0438\u0433\u0440\u043e\u043a\u0430 \u0438\u0437 \u043a\u0443\u0447\u043a\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e 11 \u043a\u0430\u043c\u043d\u0435\u0439, \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0431\u0435\u0440\u0443\u0442 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 2 \u043a\u0430\u043c\u043d\u0435\u0439. \u041f\u0440\u043e\u0438\u0433\u0440\u0430\u0432\u0448\u0438\u043c \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u0442, \u043a\u043e\u043c\u0443 \u043d\u0435\u0447\u0435\u0433\u043e \u0431\u0440\u0430\u0442\u044c. \u0412\u043c\u0435\u0441\u0442\u043e \u043a\u0430\u043c\u043d\u0435\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448\u0438, \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 21), \u0431\u0440\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 (\u0434\u043e 3 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c <em>M<\/em>). <\/p>\n<p>\u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043f\u043e\u0431\u0435\u0434\u044b \u0432 \u0438\u0433\u0440\u0435 \u00ab\u0411\u0435\u0440\u0438 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b  \u043f\u043e\u0441\u043b\u0435 \u0442\u0432\u043e\u0435\u0433\u043e \u0445\u043e\u0434\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0431\u044b\u043b\u043e \u043a\u0440\u0430\u0442\u043d\u043e (<em>M<\/em>+1)\u00bb. \u0418\u0433\u0440\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0435\u0451 \u0438\u0441\u0445\u043e\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0445\u043e\u0434\u0430, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u044b \u043d\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<h2>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438\u0433\u0440\u0435 \u0411\u0430\u0448\u0435<\/h2>\n<p>\u041e\u0431\u044a\u044f\u0441\u043d\u044e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0438\u0433\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0442\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u0432\u043e\u0434\u0438\u043c 11 \u043a\u043e\u0440\u043e\u0431\u043e\u043a \u0438 \u0431\u0435\u0440\u0451\u043c \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0444\u0438\u0448\u0435\u043a \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 1 \u0438 2.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043a\u0430\u043c\u043d\u0435\u0439,\u00a0 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u043c \u0445\u043e\u0434 (\u0431\u0435\u0440\u0451\u043c 1 \u0438\u043b\u0438 2 \u043a\u0430\u043c\u043d\u044f) \u0438 \u043a\u043b\u0430\u0434\u0451\u043c \u0432 \u043a\u043e\u0440\u043e\u0431\u043a\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0445\u043e\u0434\u0430 \u0444\u0438\u0448\u043a\u0443 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 1 \u0438\u043b\u0438 2.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0431\u0435\u0434\u0438\u043b\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0438\u0448\u043a\u0438 \u0432 \u043a\u043e\u0440\u043e\u0431\u043a\u0430\u0445. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u2013 \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c. <\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u0440\u043e\u0431\u043a\u0435 \u0435\u0441\u0442\u044c \u0444\u0438\u0448\u043a\u0438, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u043e\u0441\u0442\u0430\u0451\u043c \u0438\u0437 \u043d\u0435\u0451 \u0444\u0438\u0448\u043a\u0443, \u0438 \u0431\u0435\u0440\u0451\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u043d\u0435\u0439 \u0441 \u0444\u0438\u0448\u043a\u0438. \u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u0440\u043e\u0431\u043a\u0435 \u0444\u0438\u0448\u0435\u043a \u043d\u0435\u0442, \u0442\u043e \u0431\u0435\u0440\u0451\u043c 1 \u0438\u043b\u0438 2 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0438\u0433\u0440\u043e\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0435\u0440\u0435\u0442 \u0444\u0438\u0448\u043a\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e. \u041f\u0440\u043e\u0433\u043d\u0430\u0432 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0433\u0440\u0443 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437 (100 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435) \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u043e\u0431\u043e\u043a, \u00ab\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u00bb \u0438\u0433\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u043b\u0443\u0447\u0448\u0435 \u0438 \u043b\u0443\u0447\u0448\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0445\u043e\u0434\u0443 \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0444\u0438\u0448\u043a\u0443 \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u0430\u043c\u043d\u0435\u0439 \u0438\u0437 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0436\u0451\u0441\u0442\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0430 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u043b\u0438\u0448\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442 \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438. \u0414\u043b\u044f \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u0433\u0440\u044b \u043c\u0435\u043d\u0435\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c, \u043d\u043e \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u043c\u0435\u0442\u043e\u0434\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0435 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438) \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0447\u0435\u043c \u0438\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b, \u0445\u043e\u0442\u044f \u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 Python   <\/h2>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0442\u0435\u043a \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439: Python, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Numpy, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Kivy, \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 SQLite \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 SqlAlchemy \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u0439.<\/p>\n<p>\u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 1 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f  \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u0438\u0433\u0440\u044b, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u00abboxes\u00bb.  \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 SQLiteStudio,  \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/59b\/068\/083\/59b0680835dc4ac8cd56ebc5e873647a.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 \u2013 \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0438\u0433\u0440\u043e\u043a\u0430   \" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 \u2013 \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0438\u0433\u0440\u043e\u043a\u0430   \" width=\"1158\" height=\"700\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/59b\/068\/083\/59b0680835dc4ac8cd56ebc5e873647a.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 \u2013 \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0438\u0433\u0440\u043e\u043a\u0430   <\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 boxes \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430: <em>boxesId<\/em> (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0438); <em>boxNumber<\/em> (\u043d\u043e\u043c\u0435\u0440 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043e \u043e\u0434\u0438\u043d\u043d\u0430\u0434\u0446\u0430\u0442\u0438, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043a\u0430\u043c\u043d\u0435\u0439 \u0432 \u043a\u0443\u0447\u0435) \u0438 <em>stoneNumber<\/em> (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u043d\u0435\u0439 \u0432 \u043a\u043e\u0440\u043e\u0431\u043a\u0435, \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043e \u0434\u0432\u0443\u0445).<\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0440\u0451\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043b\u0430\u0441\u0441 Base, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u0431\u043e\u0439 \u0444\u0430\u0431\u0440\u0438\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<pre><code class=\"python\">from sqlalchemy import MetaData, create_engine from sqlalchemy.ext.declarative import as_declarative from sqlalchemy.orm import sessionmaker, scoped_session, Query, Mapper   def _get_query_cls(mapper, session):     if mapper:         m = mapper         if isinstance(m, tuple):             m = mapper[0]         if isinstance(m, Mapper):             m = m.entity          try:             return m.__query_cls__(mapper, session)         except AttributeError:             pass      return Query(mapper, session)   Session = sessionmaker(query_cls=_get_query_cls) engine = create_engine('sqlite:\/\/\/smart_warehouse.db', echo = True) metadata = MetaData(bind=engine) current_session = scoped_session(Session)   @as_declarative(metadata=metadata) class Base:     pass<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b <em>boxes<\/em> \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043b\u0430\u0441\u0441 <em>Boxes<\/em>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u043e\u043b\u044f, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c \u0432 \u0431\u0430\u0437\u0435. \u041a\u043b\u0430\u0441\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u043c <em>Base<\/em>, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c SQLAlchemy \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"python\">import sqlalchemy as sa  from .base import Base  class Boxes(Base):     __tablename__ = 'boxes'      boxesId = sa.Column(sa.Integer(), primary_key=True)     boxNumber = sa.Column(sa.Integer)     stoneNumber = sa.Column(sa.Integer)<\/code><\/pre>\n<p>\u041a\u043b\u0430\u0441\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0442\u0430\u0431\u043b\u0438\u0446, \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u043d\u0438\u0445 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0430\u0437\u0432\u0430\u043d SQLDataBase. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0432\u0438\u0436\u043a\u0430 <em>engine<\/em>, \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: <em>engine = \u0441reate_engine(&#8216;sqlite:\/\/\/&#8217; + nameOfDatabase + &#8216;.db&#8217;, echo = True)<\/em>.<\/p>\n<p>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0411\u0414 <em>nameOfDatabase1<\/em>; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>plInitial<\/em> \u0434\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441, \u043d\u0443\u0436\u043d\u043e \u0438\u043b\u0438 \u043d\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043d\u0435\u0439; \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u043d\u0435\u0439 <em>numberOfBoxes<\/em>; \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u0430\u043c\u043d\u0435\u0439 \u0434\u043b\u044f \u0438\u0437\u044a\u044f\u0442\u0438\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0445\u043e\u0434\u0430 <em>stonesList<\/em>; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>idPlayerWin<\/em>, \u0445\u0440\u0430\u043d\u044f\u0449\u0430\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0438\u0433\u0440\u043e\u043a\u0430, \u0447\u0435\u0439 \u0445\u043e\u0434 \u0438\u0434\u0451\u0442 \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0433\u0440 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f <em>epochsOfTraining<\/em>) \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <em>appEnvironment<\/em>. <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430 <em>SQLDataBase<\/em> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u043d\u0435\u0439 \u043d\u0430\u0437\u0432\u0430\u043d <em>tableCreate<\/em>, \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0435\u0441\u0441\u0438\u0438 (<em>session<\/em>), \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0431\u0430\u0437\u044b \u2013 <em>createSession<\/em>.<\/p>\n<pre><code class=\"python\">def tableCreate(self):     Base.metadata.create_all(self.engine)  def createSession(self):     self.session = sessionmaker(bind=self.engine)()<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u00ab\u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e\u00bb \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u0438\u0433\u0440\u043e\u043a\u0430 \u0432 <em>SQLDataBase<\/em> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <em>initRepletionDataBase<\/em>, \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u0439 24 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0433\u0440\u044b \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0445\u043e\u0434\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u00ab\u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0435\u00bb \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043a\u0443\u0447\u0438 1 \u0438\u043b\u0438 2 \u043a\u0430\u043c\u043d\u044f \u0441 \u0440\u0430\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e, \u043d\u0430\u0443\u0433\u0430\u0434.<\/p>\n<pre><code class=\"python\">def initRepletionDataBase(self): # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 Boxes namesList = [i+1 for i in range(apEnv.numberOfBoxes)]  # \u0414\u043e\u0431\u0430\u0432\u0430\u0442\u044c \u0432 \u0441\u0435\u0441\u0441\u0438\u044e for name in namesList:     for numberStones in apEnv.stonesList:         typeObject = Boxes(boxNumber=name, stoneNumber = numberStones)         self.session.add(typeObject) self.session.commit()<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u0435\u0441\u0441\u0438\u044e \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 <em>session<\/em> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>add<\/em>() \u0438 <em>commit<\/em>(), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 <em>initRepletionDataBase<\/em>().<\/p>\n<p>\u0412\u044b\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0445 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>listOfBoxesAndStonesInIt<\/em>().<\/p>\n<pre><code class=\"python\">def listOfBoxesAndStonesInIt(self):     # \u0412\u044b\u0437\u043e\u0432 \u0432\u0441\u0435\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430     request_str = \"SELECT boxNumber, stoneNumber \\                                   FROM \\                                   boxes;\"     s4 = self.session.execute(request_str)     result_of_query = resultproxyToDict(s4)     ciphers = []     for a1 in result_of_query:         #print(a1)         ciphers.append([a1['boxNumber'], a1['stoneNumber']])     return ciphers<\/code><\/pre>\n<p>\u0412\u0441\u043f\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>resultproxyToDict<\/em>, \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0437 \u0431\u0430\u0437\u044b \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 <em>{\u2018\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u2019: \u2018\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u2019}<\/em> \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <em>supportFunctions<\/em>. <\/p>\n<pre><code class=\"python\">def resultproxyToDict(s2): # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c d, a = {}, [] for rowproxy in s2:     # \u0414\u043b\u044f SQLAlchemy 1.4.17     k=0     for column in rowproxy._fields:         value = rowproxy._data[k]         d = {**d, **{column: value}}         k += 1     a.append(d) return a<\/code><\/pre>\n<p>\u0417\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0445\u043e\u0434\u043e\u0432 \u0438\u0433\u0440\u043e\u043a\u0430, \u043f\u0440\u0438\u0432\u0435\u0434\u0448\u0438\u0435 \u0435\u0433\u043e \u043a \u043f\u043e\u0431\u0435\u0434\u0435:<\/p>\n<pre><code class=\"python\">def addTrainingSet(self, trainingSet): #\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0448\u0435\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430 for train in trainingSet:     typeObject = Boxes(boxNumber=str(train[0]), stoneNumber=str(train[1]))     self.session.add(typeObject) self.session.commit()<\/code><\/pre>\n<p>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 <em>N<\/em> \u0438\u0433\u0440\u0430\u0445 \u2013 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0438\u0433\u0440\u0430\u044e\u0442 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0432 \u0446\u0438\u043a\u043b\u0435 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u043f\u044b\u0442 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0433\u0440\u0435 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u0442 \u0438\u0433\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0431\u0435\u0434\u0438\u043b). \u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u043c\u0435\u0440\u0430 \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043a\u0430\u043c\u043d\u0435\u0439 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u043d\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0434\u043e \u0432\u0437\u044f\u0442\u044c \u043d\u0430 \u0445\u043e\u0434\u0435. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u043e\u0440 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u0430\u043c\u043d\u0435\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0445\u043e\u0434\u0430. \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u0430\u043c, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u00ab\u043e\u043f\u044b\u0442\u0430\u00bb \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0438\u0433\u0440. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u0433\u0440, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u043f\u044b\u0442\u0430 \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u043d\u0430\u0434\u0451\u0436\u043d\u0435\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<\/p>\n<p>\u0418\u0433\u0440\u043e\u043a\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 <em>PlayerClass<\/em>(), \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0434\u0432\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430: <em>initialPlayer<\/em>() \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0433\u0440\u043e\u043a\u0430 (\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u043f\u044b\u0442\u0430 \u0438\u0433\u0440\u043e\u043a\u0430) \u0438 \u043c\u0435\u0442\u043e\u0434 <em>selectionOfStones<\/em>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0433\u0440\u043e\u043a\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u0430\u043c\u043d\u0435\u0439 \u0434\u043b\u044f \u0438\u0437\u044a\u044f\u0442\u0438\u044f, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043a\u0430\u043c\u043d\u0435\u0439.<\/p>\n<p>\u041a\u043e\u0434 PlayerClass:<\/p>\n<pre><code class=\"python\">import numpy as np from var1.applicationEnvironment import appEnvironment as apEnv from var1.dataBase.sqlDataBase import SQLDataBase  class PlayerClass():     @staticmethod     def initialPlayer(nameOfDatabase1):         #\u0424\u0443\u043a\u043d\u0446\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0433\u0440\u043e\u043a\u0430         data_base1 = SQLDataBase(nameOfDatabase1)         if (apEnv.plInitial[0] == 1):             data_base1.tableCreate()         data_base1.createSession()         if (apEnv.plInitial[0] == 1):             data_base1.initRepletionDataBase()          # \u0417\u0430\u043f\u0440\u043e\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u0438\u0437 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445         resultRequest1 = data_base1.listOfBoxesAndStonesInIt()         #\u0418\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0438\u0433\u0440\u043e\u043a\u0430         Player1 = np.asarray(resultRequest1)         # \u0421\u043f\u0438\u0441\u043e\u043a \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u043e\u043a\u0430         trainingSet1 = []         return data_base1, Player1, trainingSet1      @staticmethod     def selectionOfStones(Player1, stoneNumber, trainingSet1):         indexArrayOfStones = np.where(Player1[:, 0] == stoneNumber)         ArrayOfStones = Player1[indexArrayOfStones, 1]         idxStone = np.random.randint(ArrayOfStones.shape[1], size=1)         pickUpStones = ArrayOfStones[0, idxStone]         if (pickUpStones[0] > stoneNumber):             pickUpStones[0] = 1         trainingSet1.append([stoneNumber, pickUpStones[0]])          return trainingSet1, pickUpStones<\/code><\/pre>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <em>selectionOfStones<\/em> \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <em>Boxes<\/em> (\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0432 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435 <em>Player1<\/em>, \u0433\u0434\u0435 \u0432 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043f\u0430\u0440\u044b \u0447\u0438\u0441\u043b\u0435 <em>(\u2018\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043a\u0430\u043c\u043d\u0435\u0439\u2019, \u2018\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0437\u044f\u0442\u044c \u043a\u0430\u043c\u043d\u0435\u0439\u2019)<\/em>, \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e c \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <em>listOfBoxesAndStonesInIt<\/em>() \u043a\u043b\u0430\u0441\u0441\u0430 <em>SQLDataBase<\/em>) \u043f\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 <em>stoneNumber<\/em> (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043a\u0430\u043c\u043d\u0435\u0439). \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 <em>ArrayOfStones<\/em>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u0430 1 \u0438\u043b\u0438 2 (\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0437\u044f\u0442\u044c \u043a\u0430\u043c\u043d\u0435\u0439). \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>pickUpStones<\/em>, \u0435\u0441\u043b\u0438 \u043e\u043d \u0440\u0430\u0432\u0435\u043d 2 \u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 <em>stoneNumber<\/em>, \u0442\u043e \u0431\u0435\u0440\u0451\u0442\u0441\u044f 1. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043e\u043a <em>trainingSet1<\/em> \u043f\u0430\u0440\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <em>(stoneNumber, pickUpStones)<\/em>, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b <em>trainingSet1<\/em> \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0431\u0435\u0434\u044b \u0438\u0433\u0440\u043e\u043a\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0433\u0440\u044b (\u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <em>main<\/em>), \u0433\u0434\u0435 \u0432 \u0446\u0438\u043a\u043b\u0435 (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0440\u0430\u0432\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e <em>epochsOfTraining<\/em>) \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0438\u0433\u0440\u044b \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432, \u043f\u043e \u0438\u0442\u043e\u0433\u0430\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0431\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0438\u0445 \u00ab\u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u044b\u00bb.<\/p>\n<p>\u041a\u043e\u0434 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u043e\u043a\u043e\u0432:<\/p>\n<pre><code class=\"python\">import numpy as np  from var1.applicationEnvironment import appEnvironment as apEnv  from var1.playerModel.player import PlayerClass  for iter in range(apEnv.epochsOfTraining):     #\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430     data_base1, Player1, trainingSet1 = PlayerClass.initialPlayer(apEnv.nameOfDatabase1)     #\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430     data_base2, Player2, trainingSet2 = PlayerClass.initialPlayer(apEnv.nameOfDatabase2)      stoneNumber = apEnv.numberOfBoxes      idProgress = 1     while stoneNumber>0:         #\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0446\u0438\u043a\u043b \u0438\u0433\u0440\u044b          if (stoneNumber==apEnv.numberOfBoxes):             #\u041a\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u043c             idxPlayer = np.random.randint(2, size=1)          print(str(idProgress))         print('\u0425\u043e\u0434\u0438\u0442 \u0438\u0433\u0440\u043e\u043a ' + str(idxPlayer+1))          #\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u043d\u0435\u0439         if (idxPlayer==0):             trainingSet1, pickUpStones = PlayerClass.selectionOfStones(Player1, stoneNumber, trainingSet1)         else:             trainingSet2, pickUpStones = PlayerClass.selectionOfStones(Player2, stoneNumber, trainingSet2)               print('\u0418\u0433\u0440\u043e\u043a ' + str(idxPlayer+1) + ' \u0432\u0437\u044f\u043b ' + str(pickUpStones[0]) + ' \u043a\u0430\u043c\u043d\u0435\u0439')         stoneNumber -= pickUpStones[0]         print('\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c ' + str(stoneNumber) + ' \u043a\u0430\u043c\u043d\u0435\u0439')         idProgress +=1         if (stoneNumber == 0):             if (idxPlayer == 0):                 apEnv.idPlayerWin = 1                 print('\u041f\u043e\u0431\u0435\u0434\u0438\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u0433\u0440\u043e\u043a')             else:                 apEnv.idPlayerWin = 2                 print('\u041f\u043e\u0431\u0435\u0434\u0438\u043b \u0432\u0442\u043e\u0440\u043e\u0439 \u0438\u0433\u0440\u043e\u043a')          if (idxPlayer==0):             idxPlayer = 1          else:             idxPlayer = 0       #\u0417\u0430\u043f\u0438\u0441\u044c \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0438\u0433\u0440\u044b\u0448\u0430     if apEnv.idPlayerWin==1:         data_base1.addTrainingSet(trainingSet1)     else:         data_base2.addTrainingSet(trainingSet2)<\/code><\/pre>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/gitlab.com\/vadimpechenin\/boshe-game-with-artificial-intelligence.git\" rel=\"noopener noreferrer nofollow\">https:\/\/gitlab.com\/vadimpechenin\/boshe-game-with-artificial-intelligence.git<\/a>. \u0414\u043b\u044f \u0438\u0433\u0440\u044b \u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0434\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438: \u0438\u0433\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 (\u0432 \u043f\u0430\u043a\u0435\u0442\u0435 <em>var2HumanPlayer<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u0430) \u0438 \u0447\u0435\u0440\u0435\u0437 GUI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (\u0432 \u043f\u0430\u043a\u0435\u0442\u0435 <em>var3MobileApp<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u0430), \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 <em>Kivy<\/em>. \u0412 \u043e\u0431\u043e\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043b\u043e\u0433\u0438\u043a\u0430 \u0438\u0433\u0440\u044b \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439, \u0442\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0434\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u0443\u0436\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0434\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043e\u043a\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Kivy (\u0440\u0438\u0441\u0443\u043d\u043e\u043a 2).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0d6\/b82\/0de\/0d6b820de11d5389bb07a5b69bf5ac5e.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 \u2013 \u041e\u043a\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a (\u043b\u0435\u0432\u043e\u0435) \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0438\u0433\u0440\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e (\u043f\u0440\u0430\u0432\u043e\u0435)\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 \u2013 \u041e\u043a\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a (\u043b\u0435\u0432\u043e\u0435) \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0438\u0433\u0440\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e (\u043f\u0440\u0430\u0432\u043e\u0435)\" width=\"1054\" height=\"815\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0d6\/b82\/0de\/0d6b820de11d5389bb07a5b69bf5ac5e.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 \u2013 \u041e\u043a\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a (\u043b\u0435\u0432\u043e\u0435) \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0438\u0433\u0440\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e (\u043f\u0440\u0430\u0432\u043e\u0435)<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043e\u043a\u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c: 1) \u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u043c \u0438\u043b\u0438 \u0432\u0442\u043e\u0440\u044b\u043c; 2) \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0433\u0440\u044b (\u043a\u0430\u043a\u043e\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u043b\u0438 \u043f\u043b\u043e\u0445\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0439). \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043c\u0435\u043d\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u043d\u0435\u0439 \u0432 \u0441\u0432\u043e\u0439 \u0445\u043e\u0434, \u043d\u0430\u0436\u0438\u043c\u0430\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u00ab\u0412\u0437\u044f\u0442\u044c 1\u00bb \u0438\u043b\u0438 \u00ab\u0412\u0437\u044f\u0442\u044c 2\u00bb. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043a\u043d\u043e, \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0449\u0430\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0433\u0440\u044b \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0435\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0438\u0433\u0440\u0443. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u044b\u0438\u0433\u0440\u044b\u0448\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438, \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0439 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 (\u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e 1000 \u044d\u043f\u043e\u0445 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f) \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0448 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d!   <\/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\/767840\/\"> https:\/\/habr.com\/ru\/articles\/767840\/<\/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>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043f\u0440\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043e\u0434\u043d\u043e \u0438\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043d\u044f\u0442\u0438\u044f: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443 \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439. \u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430. <\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0441\u043e\u0432 (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432) \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0434\u043b\u0438\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u0433\u043e \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445; \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043d\u0430 \u0441\u043b\u0430\u0431\u044b\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432\u044b\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u0431\u044a\u0451\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0441\u0443\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u0434\u043b\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u0433\u0440\u044b \u0411\u0430\u0448\u0435 (\u043d\u0430\u0437\u0432\u0430\u043d\u0430 \u0432 \u0447\u0435\u0441\u0442\u044c \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u044d\u0442\u0430 \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0411\u0430\u0448\u0435 \u0434\u0435 \u041c\u0435\u0437\u0438\u0440\u0438\u0430\u043a\u0430).<\/p>\n<h2>\u0421\u0443\u0442\u044c \u0438\u0433\u0440\u044b \u0411\u0430\u0448\u0435 <\/h2>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043f\u0440\u043e \u0438\u0433\u0440\u0443: \u0434\u0432\u0430 \u0438\u0433\u0440\u043e\u043a\u0430 \u0438\u0437 \u043a\u0443\u0447\u043a\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e 11 \u043a\u0430\u043c\u043d\u0435\u0439, \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0431\u0435\u0440\u0443\u0442 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 2 \u043a\u0430\u043c\u043d\u0435\u0439. \u041f\u0440\u043e\u0438\u0433\u0440\u0430\u0432\u0448\u0438\u043c \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u0442, \u043a\u043e\u043c\u0443 \u043d\u0435\u0447\u0435\u0433\u043e \u0431\u0440\u0430\u0442\u044c. \u0412\u043c\u0435\u0441\u0442\u043e \u043a\u0430\u043c\u043d\u0435\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448\u0438, \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 21), \u0431\u0440\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 (\u0434\u043e 3 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c <em>M<\/em>). <\/p>\n<p>\u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043f\u043e\u0431\u0435\u0434\u044b \u0432 \u0438\u0433\u0440\u0435 \u00ab\u0411\u0435\u0440\u0438 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b  \u043f\u043e\u0441\u043b\u0435 \u0442\u0432\u043e\u0435\u0433\u043e \u0445\u043e\u0434\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0431\u044b\u043b\u043e \u043a\u0440\u0430\u0442\u043d\u043e (<em>M<\/em>+1)\u00bb. \u0418\u0433\u0440\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0435\u0451 \u0438\u0441\u0445\u043e\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0445\u043e\u0434\u0430, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u044b \u043d\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<h2>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438\u0433\u0440\u0435 \u0411\u0430\u0448\u0435<\/h2>\n<p>\u041e\u0431\u044a\u044f\u0441\u043d\u044e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0438\u0433\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0442\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u0432\u043e\u0434\u0438\u043c 11 \u043a\u043e\u0440\u043e\u0431\u043e\u043a \u0438 \u0431\u0435\u0440\u0451\u043c \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0444\u0438\u0448\u0435\u043a \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 1 \u0438 2.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043a\u0430\u043c\u043d\u0435\u0439,\u00a0 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u043c \u0445\u043e\u0434 (\u0431\u0435\u0440\u0451\u043c 1 \u0438\u043b\u0438 2 \u043a\u0430\u043c\u043d\u044f) \u0438 \u043a\u043b\u0430\u0434\u0451\u043c \u0432 \u043a\u043e\u0440\u043e\u0431\u043a\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0445\u043e\u0434\u0430 \u0444\u0438\u0448\u043a\u0443 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 1 \u0438\u043b\u0438 2.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0431\u0435\u0434\u0438\u043b\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0438\u0448\u043a\u0438 \u0432 \u043a\u043e\u0440\u043e\u0431\u043a\u0430\u0445. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u2013 \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c. <\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u0440\u043e\u0431\u043a\u0435 \u0435\u0441\u0442\u044c \u0444\u0438\u0448\u043a\u0438, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u043e\u0441\u0442\u0430\u0451\u043c \u0438\u0437 \u043d\u0435\u0451 \u0444\u0438\u0448\u043a\u0443, \u0438 \u0431\u0435\u0440\u0451\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u043d\u0435\u0439 \u0441 \u0444\u0438\u0448\u043a\u0438. \u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u0440\u043e\u0431\u043a\u0435 \u0444\u0438\u0448\u0435\u043a \u043d\u0435\u0442, \u0442\u043e \u0431\u0435\u0440\u0451\u043c 1 \u0438\u043b\u0438 2 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0438\u0433\u0440\u043e\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0435\u0440\u0435\u0442 \u0444\u0438\u0448\u043a\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e. \u041f\u0440\u043e\u0433\u043d\u0430\u0432 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0433\u0440\u0443 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437 (100 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435) \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u043e\u0431\u043e\u043a, \u00ab\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u00bb \u0438\u0433\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u043b\u0443\u0447\u0448\u0435 \u0438 \u043b\u0443\u0447\u0448\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0445\u043e\u0434\u0443 \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0444\u0438\u0448\u043a\u0443 \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u0430\u043c\u043d\u0435\u0439 \u0438\u0437 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0436\u0451\u0441\u0442\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0430 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u043b\u0438\u0448\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442 \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438. \u0414\u043b\u044f \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u0433\u0440\u044b \u043c\u0435\u043d\u0435\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c, \u043d\u043e \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u043c\u0435\u0442\u043e\u0434\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0435 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438) \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0447\u0435\u043c \u0438\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b, \u0445\u043e\u0442\u044f \u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 Python   <\/h2>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0442\u0435\u043a \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439: Python, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Numpy, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Kivy, \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 SQLite \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 SqlAlchemy \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u0439.<\/p>\n<p>\u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 1 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f  \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u0438\u0433\u0440\u044b, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u00abboxes\u00bb.  \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 SQLiteStudio,  \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 \u2013 \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0438\u0433\u0440\u043e\u043a\u0430   <\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 boxes \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430: <em>boxesId<\/em> (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0438); <em>boxNumber<\/em> (\u043d\u043e\u043c\u0435\u0440 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043e \u043e\u0434\u0438\u043d\u043d\u0430\u0434\u0446\u0430\u0442\u0438, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043a\u0430\u043c\u043d\u0435\u0439 \u0432 \u043a\u0443\u0447\u0435) \u0438 <em>stoneNumber<\/em> (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u043d\u0435\u0439 \u0432 \u043a\u043e\u0440\u043e\u0431\u043a\u0435, \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043e \u0434\u0432\u0443\u0445).<\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0440\u0451\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043b\u0430\u0441\u0441 Base, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u0431\u043e\u0439 \u0444\u0430\u0431\u0440\u0438\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<pre><code class=\"python\">from sqlalchemy import MetaData, create_engine from sqlalchemy.ext.declarative import as_declarative from sqlalchemy.orm import sessionmaker, scoped_session, Query, Mapper   def _get_query_cls(mapper, session):     if mapper:         m = mapper         if isinstance(m, tuple):             m = mapper[0]         if isinstance(m, Mapper):             m = m.entity          try:             return m.__query_cls__(mapper, session)         except AttributeError:             pass      return Query(mapper, session)   Session = sessionmaker(query_cls=_get_query_cls) engine = create_engine('sqlite:\/\/\/smart_warehouse.db', echo = True) metadata = MetaData(bind=engine) current_session = scoped_session(Session)   @as_declarative(metadata=metadata) class Base:     pass<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b <em>boxes<\/em> \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043b\u0430\u0441\u0441 <em>Boxes<\/em>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u043e\u043b\u044f, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c \u0432 \u0431\u0430\u0437\u0435. \u041a\u043b\u0430\u0441\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u043c <em>Base<\/em>, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c SQLAlchemy \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"python\">import sqlalchemy as sa  from .base import Base  class Boxes(Base):     __tablename__ = 'boxes'      boxesId = sa.Column(sa.Integer(), primary_key=True)     boxNumber = sa.Column(sa.Integer)     stoneNumber = sa.Column(sa.Integer)<\/code><\/pre>\n<p>\u041a\u043b\u0430\u0441\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0442\u0430\u0431\u043b\u0438\u0446, \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u043d\u0438\u0445 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0430\u0437\u0432\u0430\u043d SQLDataBase. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0432\u0438\u0436\u043a\u0430 <em>engine<\/em>, \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: <em>engine = \u0441reate_engine(&#8216;sqlite:\/\/\/&#8217; + nameOfDatabase + &#8216;.db&#8217;, echo = True)<\/em>.<\/p>\n<p>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0411\u0414 <em>nameOfDatabase1<\/em>; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>plInitial<\/em> \u0434\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441, \u043d\u0443\u0436\u043d\u043e \u0438\u043b\u0438 \u043d\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043d\u0435\u0439; \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u043d\u0435\u0439 <em>numberOfBoxes<\/em>; \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u0430\u043c\u043d\u0435\u0439 \u0434\u043b\u044f \u0438\u0437\u044a\u044f\u0442\u0438\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0445\u043e\u0434\u0430 <em>stonesList<\/em>; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>idPlayerWin<\/em>, \u0445\u0440\u0430\u043d\u044f\u0449\u0430\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0438\u0433\u0440\u043e\u043a\u0430, \u0447\u0435\u0439 \u0445\u043e\u0434 \u0438\u0434\u0451\u0442 \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0433\u0440 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f <em>epochsOfTraining<\/em>) \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <em>appEnvironment<\/em>. <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430 <em>SQLDataBase<\/em> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u043d\u0435\u0439 \u043d\u0430\u0437\u0432\u0430\u043d <em>tableCreate<\/em>, \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0435\u0441\u0441\u0438\u0438 (<em>session<\/em>), \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0431\u0430\u0437\u044b \u2013 <em>createSession<\/em>.<\/p>\n<pre><code class=\"python\">def tableCreate(self):     Base.metadata.create_all(self.engine)  def createSession(self):     self.session = sessionmaker(bind=self.engine)()<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u00ab\u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e\u00bb \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u0438\u0433\u0440\u043e\u043a\u0430 \u0432 <em>SQLDataBase<\/em> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <em>initRepletionDataBase<\/em>, \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u0439 24 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0433\u0440\u044b \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0445\u043e\u0434\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u00ab\u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0435\u00bb \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043a\u0443\u0447\u0438 1 \u0438\u043b\u0438 2 \u043a\u0430\u043c\u043d\u044f \u0441 \u0440\u0430\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e, \u043d\u0430\u0443\u0433\u0430\u0434.<\/p>\n<pre><code class=\"python\">def initRepletionDataBase(self): # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 Boxes namesList = [i+1 for i in range(apEnv.numberOfBoxes)]  # \u0414\u043e\u0431\u0430\u0432\u0430\u0442\u044c \u0432 \u0441\u0435\u0441\u0441\u0438\u044e for name in namesList:     for numberStones in apEnv.stonesList:         typeObject = Boxes(boxNumber=name, stoneNumber = numberStones)         self.session.add(typeObject) self.session.commit()<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u0435\u0441\u0441\u0438\u044e \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 <em>session<\/em> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>add<\/em>() \u0438 <em>commit<\/em>(), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 <em>initRepletionDataBase<\/em>().<\/p>\n<p>\u0412\u044b\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0445 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>listOfBoxesAndStonesInIt<\/em>().<\/p>\n<pre><code class=\"python\">def listOfBoxesAndStonesInIt(self):     # \u0412\u044b\u0437\u043e\u0432 \u0432\u0441\u0435\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430     request_str = \"SELECT boxNumber, stoneNumber \\                                   FROM \\                                   boxes;\"     s4 = self.session.execute(request_str)     result_of_query = resultproxyToDict(s4)     ciphers = []     for a1 in result_of_query:         #print(a1)         ciphers.append([a1['boxNumber'], a1['stoneNumber']])     return ciphers<\/code><\/pre>\n<p>\u0412\u0441\u043f\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>resultproxyToDict<\/em>, \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0437 \u0431\u0430\u0437\u044b \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 <em>{\u2018\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u2019: \u2018\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u2019}<\/em> \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <em>supportFunctions<\/em>. <\/p>\n<pre><code class=\"python\">def resultproxyToDict(s2): # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c d, a = {}, [] for rowproxy in s2:     # \u0414\u043b\u044f SQLAlchemy 1.4.17     k=0     for column in rowproxy._fields:         value = rowproxy._data[k]         d = {**d, **{column: value}}         k += 1     a.append(d) return a<\/code><\/pre>\n<p>\u0417\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0445\u043e\u0434\u043e\u0432 \u0438\u0433\u0440\u043e\u043a\u0430, \u043f\u0440\u0438\u0432\u0435\u0434\u0448\u0438\u0435 \u0435\u0433\u043e \u043a \u043f\u043e\u0431\u0435\u0434\u0435:<\/p>\n<pre><code class=\"python\">def addTrainingSet(self, trainingSet): #\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0448\u0435\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430 for train in trainingSet:     typeObject = Boxes(boxNumber=str(train[0]), stoneNumber=str(train[1]))     self.session.add(typeObject) self.session.commit()<\/code><\/pre>\n<p>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 <em>N<\/em> \u0438\u0433\u0440\u0430\u0445 \u2013 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0438\u0433\u0440\u0430\u044e\u0442 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0432 \u0446\u0438\u043a\u043b\u0435 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u043f\u044b\u0442 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0433\u0440\u0435 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u0442 \u0438\u0433\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0431\u0435\u0434\u0438\u043b). \u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u043c\u0435\u0440\u0430 \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043a\u0430\u043c\u043d\u0435\u0439 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u043d\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0434\u043e \u0432\u0437\u044f\u0442\u044c \u043d\u0430 \u0445\u043e\u0434\u0435. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u043e\u0440 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u0430\u043c\u043d\u0435\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0445\u043e\u0434\u0430. \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u0430\u043c, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u00ab\u043e\u043f\u044b\u0442\u0430\u00bb \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0438\u0433\u0440. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u0433\u0440, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u043f\u044b\u0442\u0430 \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u043d\u0430\u0434\u0451\u0436\u043d\u0435\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<\/p>\n<p>\u0418\u0433\u0440\u043e\u043a\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 <em>PlayerClass<\/em>(), \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0434\u0432\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430: <em>initialPlayer<\/em>() \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0433\u0440\u043e\u043a\u0430 (\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u043f\u044b\u0442\u0430 \u0438\u0433\u0440\u043e\u043a\u0430) \u0438 \u043c\u0435\u0442\u043e\u0434 <em>selectionOfStones<\/em>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0433\u0440\u043e\u043a\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u0430\u043c\u043d\u0435\u0439 \u0434\u043b\u044f \u0438\u0437\u044a\u044f\u0442\u0438\u044f, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043a\u0430\u043c\u043d\u0435\u0439.<\/p>\n<p>\u041a\u043e\u0434 PlayerClass:<\/p>\n<pre><code class=\"python\">import numpy as np from var1.applicationEnvironment import appEnvironment as apEnv from var1.dataBase.sqlDataBase import SQLDataBase  class PlayerClass():     @staticmethod     def initialPlayer(nameOfDatabase1):         #\u0424\u0443\u043a\u043d\u0446\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0433\u0440\u043e\u043a\u0430         data_base1 = SQLDataBase(nameOfDatabase1)         if (apEnv.plInitial[0] == 1):             data_base1.tableCreate()         data_base1.createSession()         if (apEnv.plInitial[0] == 1):             data_base1.initRepletionDataBase()          # \u0417\u0430\u043f\u0440\u043e\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u0438\u0437 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445         resultRequest1 = data_base1.listOfBoxesAndStonesInIt()         #\u0418\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0438\u0433\u0440\u043e\u043a\u0430         Player1 = np.asarray(resultRequest1)         #<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-357649","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/357649","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=357649"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/357649\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=357649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=357649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=357649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}