栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

使用通用国际象棋界面

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

使用通用国际象棋界面

假设GUI促进了人类用户和引擎之间的匹配。假设用户以开始

e2e4
。然后,命令将类似于:

// GUI: tell the engine to use the UCI protocoluci// ENGINE: identify  id name Chess Engineid author John Smith// ENGINE: send the options that can be changed//         in this case the hash size can have a value from 1 to 128 MBoption name Hash type spin default 1 min 1 max 128// ENGINE: sent all parameters and is readyuciok// GUI: set hash to 32 MBsetoption name Hash value 32// GUI: waiting for the engine to finish initializingisready// ENGINE: finished setting up the internal values and is ready to startreadyok// GUI: let the engine know if starting a new gameucinewgame// GUI: tell the engine the position to searchposition startpos moves e2e4// GUI: tell the engine to start searching//      in this case give it the timing information in millisecondsgo wtime 122000 btime 120000 winc 2000 binc 2000// ENGINE: send search information continuously during search//         this includes depth, search value, time, nodes, speed, and pv lineinfo depth 1 score cp -1 time 10 nodes 26 nps 633 pv e7e6info depth 2 score cp -38 time 22 nodes 132 nps 2659 pv e7e6 e2e4info depth 3 score cp -6 time 31 nodes 533 nps 10690 pv d7d5 e2e3 e7e6info depth 4 score cp -30 time 55 nodes 1292 nps 25606 pv d7d5 e2e3 e7e6 g1f3// ENGINE: return the best move foundbestmove d7d5

我简化了交互的许多方面。一个功能齐全的GUI必须支持许多其他命令,您可以在UCI规范中找到该命令(另一个来源)。您还可以查看现有GUI的工作方式。例如,如果您使用Arena,则可以按F4键以查看命令交互的日志,



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/405956.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号