首页 > 其他分享 >自己制作适合6寸阅读器的棋书

自己制作适合6寸阅读器的棋书

时间:2022-12-11 01:33:05浏览次数:64  
标签:Crazy 棋书 mi 象棋 适合 阅读器 Go AlphaZero was

网上有许多棋谱,例如 棋谱 - 象棋巫师棋谱仓库 (xqbase.com) 。

在 象棋资源 - 象棋百科全书 (xqbase.com) 下载象棋巫师,选项—微博选项,图片类型选印刷,魔法—生成图片棋盘:

   

在WPS Office里输入(比如): 

1. 炮二平五 马8进7 2. 马二进三 车9平8
3. 兵七进一 卒7进1 4. 马八进七 炮2平5

按Ctrl+Enter换页,然后粘贴棋盘图片。如此重复直至结束。然后文件—输出为PDF。[ 成品例子 ]

阅读方法:在脑海里走棋,然后翻到下页印证下,如此重复。

象棋巫师—文件—查看文本棋谱并从如 1. 炮二平五 *复制到结束,再运行下面的Python程序:

# -*- coding: gbk -*-
# pip install pywin32
import win32clipboard as w
import win32con
import re

def get_text():
    w.OpenClipboard()
    s = w.GetClipboardData(win32con.CF_UNICODETEXT)
    w.CloseClipboard()
    return s
    
def set_text(s):
    w.OpenClipboard()
    w.EmptyClipboard()
    #w.SetClipboardData(win32con.CF_TEXT, s.encode('utf-16le'))
    w.SetClipboardData(win32con.CF_UNICODETEXT, s)
    w.CloseClipboard()

s = ''
lst = get_text().splitlines()
for i in range(len(lst)):
    t = re.sub('^ +', '', lst[i])
    s += t + '¡¡'
    if (i + 1) % 2 == 0: s += '\n'
s = s.replace('1-0', '').replace('*', '')
print(s)
set_text(s)
View Code

可以得到前述两步一行的文本。

下载象棋巫师后,可先用你最信任的各种杀毒软件检查下,然后在Windows安全中心里把它所在的目录加入排除项。这样它自带的引擎ELEEYE.exe的启动速度会快很多。Windows安全中心搞歧视,我用VC6和tdm-gcc编译出来的程序,每次运行都要被扫一扫。Python.exe好像也被扫。VC6工程里加入VERSION也没用。

ELEEYE.exe是个console程序,运行后输入ucci并回车等,详情见 中国象棋电脑应用规范(五):中国象棋通用引擎协议 (xqbase.com)

ELO等级分计算公式 (xqbase.com) 舍得花几百元买皮肤,舍不得花90元买这个?

  • 象棋旋风基础版(单核版)售价90元,在低档电脑上具有相当于特级大师的对弈水平
  • 象棋旋风专业版(双核版)售价180元,在普通电脑上具有超越特级大师的对弈水平

讲道理,付款是有点麻烦——我没有装支F宝。

An efficiently updatable neural network (NNUE, a Japanese wordplay on Nue, sometimes stylised as ƎUИИ) is a neural network -based evaluation function whose inputs are piece-square tables, or variants thereof like the king-piece-square table. NNUE is used primarily for the leaf nodes of the alpha–beta tree.

红黑双方各有7种棋子,合计14种,因此可把局面看作一张9x10的图片,每个像素16种颜色——对于人脸识别来说好像很小啊。类似的技术应该可以:对于任意一个局面,给出它的分数,那引擎岂不是简化成生成所有走法(就一步),跳出分最高的就行了?:-)

局面评估函数——简介(二) | http://www.ics.uci.edu/~eppstein/180a/970415.html (Lecture notes for April 15, 1997)

Intel CPU 发展简史 - 蜗牛ai小芳:1997年5月7日,英特尔发布Pentium II 233MHz、Pentium II 266MHz、Pentium II 300MHz三款PII处理器,采用了0.35微米工艺技术,核心提升到750万个晶体管组成。350nm工艺,0.075亿个晶体管。和下面这个比:

In 2017, DeepMind announced a new engine called AlphaZero, which significantly improved on the prior AlphaGo. While AlphaGo only was able to play Go, and was trained using human games as an input, AlphaZero was trained from scratch, and could play Chess, Shogi, and Go - all at state of the art levels.

engines - Which is better-Stockfish 10 or AlphaZero? - Chess Stack Exchange

AlphaZero beat Stockfish 8 by +155 = 839 -6, which is an elo difference of about 50. The latest versions of Stockfish are capable of beating Stockfish 8 by about 150 elo. 现在Stockfish 16有beta版了,AlphaZero呢?

不提识别率光吹算力,是怕别人不知道自己其实进步不大么?:-)

DeepMind was acquired by Google in 2014. [买来的啊] Alpha Zero works slightly differently. The key to AZ is the Monte Carlo Tree Search algorithm. MCTS is a four-step process to building out a tree. First, AZ will select a new node in the tree. This selection process weights both exploration and exploitation using the PUCT algorithm, meaning that more promising nodes (the nodes which seem better so far) tend to be explored more often, but nodes that haven't been explored much so far also get a chance for expansion.

Monte Carlo Tree Search - About (swarthmore.edu)

Monte Carlo Tree Search was introduced by Rémi Coulom in 2006 as a building block of Crazy Stone – Go playing engine with an impressive performance.

Rémi Coulom - Chessprogramming wiki 

Rémi Coulom, a French computer scientist, freelance programmer in the field of artificial intelligence in games, and former associate professor (Maître de Conférences) of computer science at the Charles de Gaulle University – Lille III, and a member of the GRAPPA and SequeL research groups, in Lille, France. Rémi contributed to computer chess with his famous chess program The Crazy Bishop, the Bayesian Elo Rating system and the Treemap search-tree visualization. The Crazy Bishop was one of the pioneers in supporting the Chess Engine Communication Protocol. His more recent research interests focus on the more challenging domains. His Lines of Action program Lola and Computer Go playing program Crazy Stone deal with Monte-Carlo Tree Search and Neural Networks, and as of May 2016, Deep Learning. His generic AlphaZero implementation dubbed CrazyZero has networks trained to play Go, Shogi, Gomoku, Othello, Renju, and Chess.

Rémi Coulom,法国计算机科学家,游戏人工智能领域的自由程序员,前夏尔·戴高乐大学里尔III计算机科学副教授(Maître de Conférences),法国里尔GRAPPA和SequeL研究小组成员。雷米以其著名的国际象棋程序《疯狂的主教》、贝叶斯埃洛评级系统和Treemap搜索树可视化为计算机国际象棋做出了贡献。疯狂主教是支持国际象棋引擎通信协议的先驱之一。他最近的研究兴趣集中在更具挑战性的领域。他的《行动线》(Lines of Action)程序Lola和《电脑围棋》(Computer Go)游戏程序Crazy Stone处理蒙特卡洛树搜索和神经网络,截至2016年5月,深度学习(Deep Learning)。他的通用AlphaZero实现被称为CrazyZero,其网络经过训练,可以玩围棋、将棋、五子棋、奥赛罗、仁举和国际象棋。

标签:Crazy,棋书,mi,象棋,适合,阅读器,Go,AlphaZero,was
From: https://www.cnblogs.com/funwithwords/p/16972738.html

相关文章