当前位置: X-MOL 学术arXiv.cs.GT › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
An Algorithm for Automatically Updating a Forsyth-Edwards Notation String Without an Array Board Representation
arXiv - CS - Computer Science and Game Theory Pub Date : 2020-09-02 , DOI: arxiv-2009.03193
Azlan Iqbal

We present an algorithm that correctly updates the Forsyth-Edwards Notation (FEN) chessboard character string after any move is made without the need for an intermediary array representation of the board. In particular, this relates to software that have to do with chess, certain chess variants and possibly even similar board games with comparable position representation. Even when performance may be equal or inferior to using arrays, the algorithm still provides an accurate and viable alternative to accomplishing the same thing, or when there may be a need for additional or side processing in conjunction with arrays. Furthermore, the end result (i.e. an updated FEN string) is immediately ready for export to any other internal module or external program, unlike with an intermediary array which needs to be first converted into a FEN string for export purposes. The algorithm is especially useful when there are no existing array-based modules to represent a visual board as it can do without them entirely. We provide examples that demonstrate the correctness of the algorithm given a variety of positions involving castling, en passant and pawn promotion.

中文翻译:

一种无需阵列板表示自动更新 Forsyth-Edwards 符号字符串的算法

我们提出了一种算法,该算法可以在进行任何移动后正确更新 Forsyth-Edwards Notation (FEN) 棋盘字符串,而无需棋盘的中间数组表示。特别是,这涉及与国际象棋、某些国际象棋变体甚至可能具有可比位置表示的类似棋盘游戏有关的软件。即使在性能可能与使用数组相同或低于使用数组时,该算法仍然提供了一种准确可行的替代方法来完成相同的事情,或者当可能需要与数组结合进行额外或旁侧处理时。此外,最终结果(即更新的 FEN 字符串)可以立即导出到任何其他内部模块或外部程序,与需要首先转换为 FEN 字符串以用于导出目的的中间数组不同。当没有现有的基于阵列的模块来表示视觉板时,该算法特别有用,因为它可以完全没有它们。我们提供了一些例子来证明算法的正确性,考虑到涉及 castling、en passant 和 pawn Promotion 的各种位置。
更新日期:2020-09-08
down
wechat
bug