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

09/02/2020
by   Azlan Iqbal, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/06/2021

On Arithmetically Progressed Suffix Arrays and related Burrows-Wheeler Transforms

We characterize those strings whose suffix arrays are based on arithmeti...
research
12/21/2018

A Simple Algorithm for Computing the Document Array

We present a simple algorithm for computing the document array given the...
research
12/23/2021

Dynamic Suffix Array with Sub-linear update time and Poly-logarithmic Lookup Time

The Suffix Array SA_S[1… n] of an n-length string S is a lexicographical...
research
06/08/2023

Longest Common Prefix Arrays for Succinct k-Spectra

The k-spectrum of a string is the set of all distinct substrings of leng...
research
02/17/2020

Computing Covers under Substring Consistent Equivalence Relations

Covers are a kind of quasiperiodicity in strings. A string C is a cover ...
research
09/26/2021

An Analysis into the Performance and Memory Usage of MATLAB Strings

MATLAB is a mathematical computing environment used by many engineers, m...
research
08/12/2023

3D Printing Magnetophoretic Displays

We present a pipeline for printing interactive and always-on magnetophor...

Please sign up or login with your details

Forgot password? Click here to reset