Changes

Jump to: navigation, search

Entering Moves

11,259 bytes added, 14:55, 17 May 2018
Created page with "'''Home * User Interface * Entering Moves''' FILE:bernstein-alex.1958.l02645391.ibm-archives.jpg|border|right|thumb|link=http://www.computerhistory.org/ch..."
'''[[Main Page|Home]] * [[User Interface]] * Entering Moves'''

[[FILE:bernstein-alex.1958.l02645391.ibm-archives.jpg|border|right|thumb|link=http://www.computerhistory.org/chess/full_record.php?iid=stl-431614f6482e6| [[Alex Bernstein]] entering moves into the [[IBM 704]] console, 1958 <ref>[http://www.computerhistory.org/chess/full_record.php?iid=stl-431614f6482e6 IBM programmer Alex Bernstein] 1958 Courtesy of [[IBM]] Archives from [[The Computer History Museum]]</ref> ]]

'''Entering Moves''' is the [https://en.wikipedia.org/wiki/User_%28computing%29 user's] primary input while [https://en.wikipedia.org/wiki/Interaction interacting] with the chess program during [[Chess Game|game play]], to [[Make Move|make a move]]. Chess engines using a [[CLI|command line interface]] may rely on external chess user interfaces or [[GUI|GUIs]] and their [[Protocols|protocols]] without dealing with possible ambiguous and order dependent user interactions while entering [[Moves|moves]], and receive moves in a defined [[Game Notation|notation]] via a [https://en.wikipedia.org/wiki/Standard_streams#Standard_input_.28stdin.29 standard input stream]. The [[Chess Engine Communication Protocol]] and the [[UCI|Universal Chess Interface]] both use simple to [https://en.wikipedia.org/wiki/Parsing parse] [[Algebraic Chess Notation#PureCoordinateNotation|pure algebraic coordinate notation]] <ref>see [[CPW-Engine_algebraic]]</ref>. XBoard version 2 has the option to switch on [[Algebraic Chess Notation#SAN|SAN]]. Entering moves inside an [https://en.wikipedia.org/wiki/Event-driven_architecture event driven] GUI, more intuitive for the casual user not familiar with chess coordinates, requires more effort for the GUI programmer.

=CLI=
In a sequential [[CLI|command line interface]] the chess program prompts for input. Unless [https://en.wikipedia.org/wiki/Redirection_%28computing%29 redirected], input is expected from the [https://en.wikipedia.org/wiki/Keyboard_%28computing%29 keyboard]. In CLI, [https://en.wikipedia.org/wiki/Typing text input] is usually [https://en.wikipedia.org/wiki/Keyboard_buffer buffered] and [https://en.wikipedia.org/wiki/Echo_%28computing%29 echoed] by the [https://en.wikipedia.org/wiki/Operating_system operating system] until the user confirms it by pressing the [https://en.wikipedia.org/wiki/Enter_key enter- or return key], causing the OS to transfer the whole text line via [https://en.wikipedia.org/wiki/Standard_streams standard streams] to the program.

The user has to type in his move according to the syntax or [[Game Notation|notation]] the program or GUI understands, most common [[Algebraic Chess Notation#PureCoordinateNotation|pure algebraic coordinate notation]] as used in the [[Chess Engine Communication Protocol]] and the [[UCI|Universal Chess Interface]], that is:
<pre>
<move notation> ::= <from square><to square>[<promoted to>]
<square> ::= <file letter><rank number>
<file letter> ::= 'a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'
<rank number> ::= '1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'
<promoted to> ::= 'q'|'r'|'b'|'n'
</pre>
A from-to delimiter, a dash, hyphen or space for [[Quiet Moves|quiet moves]] or 'x' or colon for [[Captures|captures]], is usually omitted and may only used in a [[GUI#NotationWindow|notation window]] to make it easier to read for humans. Castles are given by king from-to coordinates ('e1g1', 'e1c1') or its own syntax of 'O-O' or 'O-O-O', also required for [[Chess960]].

=GUI=
Event driven [[GUI|graphical user interfaces]] allow more flexible interactions to enter moves. While this is more user friendly, it is more effort for the GUI programmer, due to the implementation of a [https://en.wikipedia.org/wiki/Finite-state_machine finite state machine] for various states, modes and actions of a sequence of move entering interactions by a [https://en.wikipedia.org/wiki/Pointing_device pointing device] and/or keyboard, considering possible different [https://en.wikipedia.org/wiki/Focus_%28computing%29 focus windows] like [[GUI#BoardWindow|board window]], [[GUI#NotationWindow|notation window]] or a dedicated CLI-like command window or [https://en.wikipedia.org/wiki/Form_%28programming%29 form], and also focus changes.

==Board Interactions==
===Drag-and-drop===
The "natural" way to enter moves, similar to the interactions of a real chessboard, is [https://en.wikipedia.org/wiki/Drag-and-drop drag-and-drop] with the pointing device, also emulated by the keyboard. The user first selects the [[Pieces|piece]] on its [[Origin Square|departure square]], grabs it by [https://en.wikipedia.org/wiki/Point-and-click clicking] a device button, to drag it to the [[Target Square|destination square]], where the button is released to drop the piece. Another pointing device alternative without dragging is to select both squares in any order. A drag-and-drop or click-click keyboard simulation would require a square [https://en.wikipedia.org/wiki/Cursor_%28computers%29 cursor], navigated by [https://en.wikipedia.org/wiki/Arrow_keys arrow keys] and/or entering square coordinates ([[Files|file]] letter and [[Ranks|rank]] number in any order), and for instance the space key to grab and drop the piece.

===Assistants===
Some GUIs support casual players by indicating all possible destination squares after selecting the piece, or the other way around, after first selecting a destination square, highlighting all pieces on the board which may move to that square.
[[FILE:ChessForAndroidv1.png|none|border|text-bottom|link=@http://www.aartbik.com/MISC/android.html]]
[[Aart Bik|Aart Bik's]] [[Chess for Android]], selecting f3 shows all queen targets highlighted <ref>[http://www.aartbik.com/MISC/android.html Aart's Android Page]</ref>

Advanced modes for ambitious Blitz players may already confirm the move entering interaction, if only one piece can move to a selected destination square, or if a selected piece has only one move. Similar is possible for moves that seem plausible according to some move entering heuristics, for instance ''Heumas'' (Heuristic Move Assistant - developed by [[Chrilly Donninger]] <ref>[http://www.scleinzell.schachvereine.de/p_wm_tipps/tipps0006.shtml#2 Eingabehilfe "Heumas" bei ChessBase 7.0] by [[Peter Schreiner]] (German), [http://scleinzell.schachvereine.de/home/news.shtml Schachclub Leinzell]</ref> ), as used in [[ChessBase]] or [[Fritz#FritzGUI|Fritz GUI]] <ref>[http://www.chessbase.com/support/support.asp?pid=8 Support - ChessBase: August 16th, 1998]</ref> .

===Promotions===
[[Promotions]] require the additional interaction to chose a piece, which might be implemented via a [https://en.wikipedia.org/wiki/Context_menu menu] popping up on the [[Promotion Square|promotion square]], temporarily grabbing the keyboard focus - or similar, but slightly less comfortable, using a [https://en.wikipedia.org/wiki/Modal_window modal dialog] with a small [https://en.wikipedia.org/wiki/List_box list box] or four [https://en.wikipedia.org/wiki/Radio_button radio-buttons] and an [https://en.wikipedia.org/wiki/Okay#Computers OK button] to confirm, in all cases queening as default. Entering a piece letter should be appropriate as well to finish the sequence of move entering interactions.

==Move List Interactions==
If the notation window has the keyboard focus, pressing a none control key may activate a [https://en.wikipedia.org/wiki/Text_box text box] to enter moves in various notations like [[Algebraic Chess Notation#PureCoordinateNotation|pure algebraic coordinates]], [[Algebraic Chess Notation#LAN|LAN]] or [[Algebraic Chess Notation#SAN|SAN]]. Further, a [https://en.wikipedia.org/wiki/Content_assist Content assist] or [https://en.wikipedia.org/wiki/Combo_box combo box] may list all possible moves, where the user may choose one.

=Dedicated Chess Computers=
[[Dedicated Chess Computers]] have their own move entering systems, the board computers likely [[Sensory Board|sensory boards]] with pressure-sensitive switches or [[Piece Recognition|piece recognition]]. Small chess computers often have a dedicated coordinate keyboard, eight keys to enter file and rank in context of from- and then to-square.
[[FILE:ElektorCC.jpg|none|border|text-bottom|480px|link=http://www.andreadrian.de/schach/#Selbstbau_Schachcomputer_SHAH]]
[https://en.wikipedia.org/wiki/Elektor Elektor] Chess Computer with [[Micro-Max]] inside <ref>[https://en.wikipedia.org/wiki/Elektor Elektor] Chess Computer from [http://www.andreadrian.de/schach/ Computer Schach] by [[Andre Adrian]] (German)</ref>

More minimalistic systems, like [[Harm Geert Muller|Harm Geert Muller's]] [[Usurpator#Matchbox|Matchbox Usurpator]] <ref>[http://home.hccnet.nl/h.g.muller/chess.html HGM's Chess Pages]</ref> <ref>[[Harm Geert Muller]] ('''1990'''). ''A Matchbox Chess Computer''. [[ICGA Journal|ICCA Journal]], Vol. 13, No. 4</ref> , even managed move input with only one switch and some mode feedback from the display.

=Computer Vision=
Chess playing [[Robots]] may recognize the moves their (human) opponents made on an ordinary chess board in a more sophisticated way by [https://en.wikipedia.org/wiki/Computer_vision computer vision] <ref>[http://de.scientificcommons.org/huiyan_chua Chua Huiyan], Le Vinh, [http://www.informatik.uni-trier.de/%7Eley/db/indices/a-tree/k/Kuan:Wong_Lai.html Wong Lai Kuan] ('''2007'''). ''Chess Vision''. [https://en.wikipedia.org/wiki/NUS_School_of_Computing School of Computing], [https://en.wikipedia.org/wiki/National_University_of_Singapore National University of Singapore], [http://www.comp.nus.edu.sg/~cs4243/showcase/chess_vision/Chess-Vision-Presentation.pdf slides as pdf]</ref> and [https://en.wikipedia.org/wiki/Real-time real-time] video [https://en.wikipedia.org/wiki/Image_processing image processing].

=Parsing=
While [https://en.wikipedia.org/wiki/Parsing parsing] move notations, especially [[Algebraic Chess Notation#SAN|SAN]] <ref>[http://www.thechessdrum.net/PGN_Reference.txt Standard: Portable Game Notation Specification and Implementation Guide] by [[Steven Edwards]] - 8.2.3: Movetext SAN (Standard Algebraic Notation)</ref>, it is handy to have a [[Move List|list]] of [[Legal Move|legal moves]] available for the current position the engine is pondering on. Programs may tolerate redundant, overdetermined from-square specifications in SAN like given by LAN, including dash or hyphen. Leading piece letters are supposed to be upper case, while file letters and promoted piece letters should be lower case characters.

=See also=
* [[Algebraic Chess Notation]]
* [[Dedicated Chess Computers]]
* [[GUI|Graphical User Interface]]
* [[Protocols]]
* [[Robots]]
* [[Voice User Interface]]

=External Links=
* [http://www.thechessdrum.net/PGN_Reference.txt Standard: Portable Game Notation Specification and Implementation Guide] by [[Steven Edwards]]
* [https://en.wikipedia.org/wiki/Input_device Input device from Wikipedia]
* [https://en.wikipedia.org/wiki/Human_interface_device Human interface device]
* [https://en.wikipedia.org/wiki/Computer_keyboard Computer keyboard]
* [https://en.wikipedia.org/wiki/Mouse_%28computing%29 Mouse (computing)]
* [https://en.wikipedia.org/wiki/Touchscreen Touchscreen]

=References=
<references />

'''[[User Interface|Up one Level]]'''

Navigation menu