2048-wasm:带有WebAssembly的2048 AI-源码

上传者: 42135754 | 上传时间: 2021-08-22 11:45:05 | 文件大小: 384KB | 文件类型: ZIP
2048 AI 为游戏2048制作的AI。在大多数情况下,AI可以达到16384,有时甚至可以达到32768。 经过5次尝试,AI在浏览器版本中达到了32768磁贴,得分为630032。下面是该游戏的屏幕截图。 算法 该AI是在浏览器上并行运行的Expectimax搜索,没有任何后端服务器或浏览器控件,因此您甚至可以在移动设备上运行它。 AI使用4个Web工作程序,每个工作程序都是一个用C ++和Emscripten编译的WebAssembly模块,用于对每个可用动作执行Expectimax搜索。 选择结果最高的棋步。 因为搜索是并行完成的,并且工作人员使用了诸如位板表示,查找表之类的大量优化,所以AI可以在很短的时间内进行非常深的搜索(默认搜索深度为7)。 基准测试(控制台应用程序,英特尔:registered:酷睿:trade_mark:i5-8300H处理器) 深度 游戏类 分数 %32768 %16384 %81

文件下载

资源详情

[{"title":"( 40 个子文件 384KB ) 2048-wasm:带有WebAssembly的2048 AI-源码","children":[{"title":"2048-wasm-master","children":[{"title":"style","children":[{"title":"fonts","children":[{"title":"ClearSans-Bold-webfont.woff <span style='color:#111;'> 26.48KB </span>","children":null,"spread":false},{"title":"ClearSans-Regular-webfont.svg <span style='color:#111;'> 80.74KB </span>","children":null,"spread":false},{"title":"ClearSans-Regular-webfont.woff <span style='color:#111;'> 26.14KB </span>","children":null,"spread":false},{"title":"clear-sans.css <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"ClearSans-Light-webfont.eot <span style='color:#111;'> 24.97KB </span>","children":null,"spread":false},{"title":"ClearSans-Regular-webfont.eot <span style='color:#111;'> 22.94KB </span>","children":null,"spread":false},{"title":"ClearSans-Light-webfont.svg <span style='color:#111;'> 94.01KB </span>","children":null,"spread":false},{"title":"ClearSans-Bold-webfont.svg <span style='color:#111;'> 77.35KB </span>","children":null,"spread":false},{"title":"ClearSans-Light-webfont.woff <span style='color:#111;'> 28.03KB </span>","children":null,"spread":false},{"title":"ClearSans-Bold-webfont.eot <span style='color:#111;'> 23.26KB </span>","children":null,"spread":false}],"spread":true},{"title":"aiui.css <span style='color:#111;'> 649B </span>","children":null,"spread":false},{"title":"main.css <span style='color:#111;'> 20.16KB </span>","children":null,"spread":false}],"spread":true},{"title":"index.html <span style='color:#111;'> 4.12KB </span>","children":null,"spread":false},{"title":"cpp","children":[{"title":"move.hpp <span style='color:#111;'> 2.07KB </span>","children":null,"spread":false},{"title":"board.hpp <span style='color:#111;'> 1015B </span>","children":null,"spread":false},{"title":"hash.hpp <span style='color:#111;'> 1.28KB </span>","children":null,"spread":false},{"title":"2048-web.cpp <span style='color:#111;'> 501B </span>","children":null,"spread":false},{"title":"2048.cpp <span style='color:#111;'> 4.66KB </span>","children":null,"spread":false},{"title":"search.hpp <span style='color:#111;'> 2.40KB </span>","children":null,"spread":false},{"title":"heuristic.hpp <span style='color:#111;'> 2.43KB </span>","children":null,"spread":false}],"spread":true},{"title":"32768.png <span style='color:#111;'> 53.78KB </span>","children":null,"spread":false},{"title":"favicon.ico <span style='color:#111;'> 4.19KB </span>","children":null,"spread":false},{"title":"js","children":[{"title":"application.js <span style='color:#111;'> 2.06KB </span>","children":null,"spread":false},{"title":"keyboard_input_manager.js <span style='color:#111;'> 3.92KB </span>","children":null,"spread":false},{"title":"game_manager.js <span style='color:#111;'> 7.45KB </span>","children":null,"spread":false},{"title":"html_actuator.js <span style='color:#111;'> 3.95KB </span>","children":null,"spread":false},{"title":"ai.js <span style='color:#111;'> 13.23KB </span>","children":null,"spread":false},{"title":"local_storage_manager.js <span style='color:#111;'> 1.55KB </span>","children":null,"spread":false},{"title":"tile.js <span style='color:#111;'> 594B </span>","children":null,"spread":false},{"title":"bind_polyfill.js <span style='color:#111;'> 220B </span>","children":null,"spread":false},{"title":"grid.js <span style='color:#111;'> 2.47KB </span>","children":null,"spread":false},{"title":"classlist_polyfill.js <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"ai.wasm <span style='color:#111;'> 6.89KB </span>","children":null,"spread":false},{"title":"animframe_polyfill.js <span style='color:#111;'> 890B </span>","children":null,"spread":false}],"spread":false},{"title":"meta","children":[{"title":"apple-touch-startup-image-640x920.png <span style='color:#111;'> 41.04KB </span>","children":null,"spread":false},{"title":"apple-touch-icon.png <span style='color:#111;'> 5.67KB </span>","children":null,"spread":false},{"title":"apple-touch-startup-image-640x1096.png <span style='color:#111;'> 69.05KB </span>","children":null,"spread":false}],"spread":true},{"title":"LICENSE <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 3.88KB </span>","children":null,"spread":false},{"title":"makefile <span style='color:#111;'> 178B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明