论文标题

一种用于自动更新福赛斯式符号字符串的算法,没有数组板表示

An Algorithm for Automatically Updating a Forsyth-Edwards Notation String Without an Array Board Representation

论文作者

Iqbal, Azlan

论文摘要

我们提出了一种算法,该算法正确地更新了不需要板中的中介数组表示的任何移动后,都可以更新Forsyth-Edwards符号(FEN)棋盘字符串。特别是,这与与国际象棋,某些国际象棋变体以及可能具有可比位置表示形式的棋盘游戏有关的软件有关。即使性能可能相等或不如使用数组,该算法仍然提供了完成同一操作的准确替代方案,或者当可能需要与数组结合使用其他或侧面处理时。此外,最终结果(即更新的FEN字符串)立即准备出导出到任何其他内部模块或外部程序,这与中介数组不同,该数组首先需要将其转换为FEN字符串以进行导出目的。当没有现有基于数组的模块以表示视觉板的情况下,该算法特别有用。我们提供的示例证明了算法的正确性,并且涉及涉及castling,en passant和Pawn促进的各种位置。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源