Author Topic: Playing Chess on the Computer like it's 1985  (Read 43 times)

Asher Hurowitz

  • Administrator
  • Full Member
  • *****
  • Posts: 135
  • The Founder and Administrator of the Forum
    • View Profile
Playing Chess on the Computer like it's 1985
« on: February 17, 2018, 04:17:41 pm »
The Sjeng text based chess engine is available for free on any Mac, no internet connection or download necessary!
Just open the terminal application and enter the following commands:

cd /Applications/Chess.app/Contents/Resources

Then:

./sjeng.ChessEngine

You should see something like this (I tried to copy the program here but it's muddled up for whatever reason):
  +----+----+----+----+----+----+----+----+
8 | *R | *N | *B |    | *K | *B |    | *R |
  +----+----+----+----+----+----+----+----+
7 | *P | *P | *Q |    |    | *P | *P | *P |
  +----+----+----+----+----+----+----+----+
6 |    |    |    |    | *P | *N |    |    |
  +----+----+----+----+----+----+----+----+
5 |    |    |    | *P |    |    |    |    |
  +----+----+----+----+----+----+----+----+
4 |    |    |    |  P |    |    |    |    |
  +----+----+----+----+----+----+----+----+
3 |    |    |  P |    |    |    |    |    |
  +----+----+----+----+----+----+----+----+
2 |  P |  P |    |    |  P |  P |  P |  P |
  +----+----+----+----+----+----+----+----+
1 |  R |  N |    |  Q |  K |  B |  N |  R |
  +----+----+----+----+----+----+----+----+

     a    b    c    d    e    f    g    h

It doesn't use algebraic notation, you have to enter the square the piece is on and the destination square, nothing else, with no space in between.

Therefore 1.e4 ---> 1.d2d4

I hope you check it out!
« Last Edit: February 17, 2018, 04:20:56 pm by Asher Hurowitz »
Indeed it is certain that Chess Variants make me happy.

My Youtube Channel on Chess Variants
https://www.youtube.com/channel/UCb-lm6a8XZo0eqAhfR4QWOg

My Lecture at Yale University, aged 13
https://www.youtube.com/watch?v=smDO2Dpx5tg

My Youtube Channel on Rubik's Cube
Search"Polyhedral Paradise"

Share on Facebook Share on Twitter


HGMuller

  • Global Moderator
  • Full Member
  • *****
  • Posts: 122
    • View Profile
Re: Playing Chess on the Computer like it's 1985
« Reply #1 on: February 18, 2018, 02:19:10 am »
Note that Sjeng is also available as an engine that can be run under WinBoard, for those that rather move pieces around with the mouse than having to type them.

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Playing Chess on the Computer like it's 1985
« Reply #2 on: February 18, 2018, 04:41:48 pm »
You should see something like this (I tried to copy the program here but it's muddled up for whatever reason):

Try using the "code" button to force it into a mono-spaced font:

Code: [Select]
  +----+----+----+----+----+----+----+----+
8 | *R | *N | *B |    | *K | *B |    | *R |
  +----+----+----+----+----+----+----+----+
7 | *P | *P | *Q |    |    | *P | *P | *P |
  +----+----+----+----+----+----+----+----+
6 |    |    |    |    | *P | *N |    |    |
  +----+----+----+----+----+----+----+----+
5 |    |    |    | *P |    |    |    |    |
  +----+----+----+----+----+----+----+----+
4 |    |    |    |  P |    |    |    |    |
  +----+----+----+----+----+----+----+----+
3 |    |    |  P |    |    |    |    |    |
  +----+----+----+----+----+----+----+----+
2 |  P |  P |    |    |  P |  P |  P |  P |
  +----+----+----+----+----+----+----+----+
1 |  R |  N |    |  Q |  K |  B |  N |  R |
  +----+----+----+----+----+----+----+----+

     a    b    c    d    e    f    g    h

or do something like this:

Code: [Select]
  8  r n b q k b n r
  7  p p p p p p p p
  6  . . . . . . . .
  5  . . . . . . . .
  4  . . . . . . . .
  3  . . . . . . . .
  2  P P P P P P P P
  1  R N B Q K B N R

     a b c d e f g h

or my elaborate board I used to solve the 8-piece tablebase for checkers with Distance To Win:

Code: [Select]
**********************************************************************************
* 8-piece database, 0 white kings 4 white checkers vs. 0 red kings 4 red checkers *
**********************************************************************************

TOTAL POSITIONS: 241788751
TOTAL BYTES:     483577502


TOTAL WINS   (white to move)........... 106319308
TOTAL DRAWS  (white to move)........... 117044823
TOTAL LOSSES (white to move)........... 18424620

Wins resolved as jumps................. 88446219
Draws resolved as jumps................ 20348119
Losses resolved as jumps............... 3018394

Losses from inability to make a move... 324

Wins resolved from moving.............. 17873089
Draws resolved from moving............. 83595296
Losses resolved from moving............ 15405902
(excludes inability to move, counted separately, otherwise 15406226).

Wins with NO JUMPS for EITHER SIDE..... 14486516
Draws with NO JUMPS for EITHER SIDE.... 73350152
Losses with NO JUMPS for EITHER SIDE... 5092434

Draws resolved from unknowns........... 13101408

Cumulative win length improvements..... 1297865
Cumulative loss length changes......... 520837


Database resolved after 17 iterations (includes  1 JUMP pass + 1 pass to set UNKNOWN values to DRAW).
The longest win requires 237 ply to complete.

There are 8 wins of the same length in this database slice.
One of the longest white to move and win positions: (white pieces start at top of board)

***************************************************************************************************************
*----------*----------*----------*----------*----------*----------*----------*----------*----------*----------*
*----------*----------*----------*----------*----------*----------*----------*----------*----------*----------*
*----------*----------*----------*----------*----------*----------*----------*----------*----------*----------*
*----------*----------*----------*----------*----------*----------*----------*----------*----------*----------*
*----------*----------*----------*----------*----------*----------*----------*----------*----------*----------*
***************************************************************************************************************
*----------*##########*          *##########*          *##########*          *##########*          *----------*
*----------*##########*          *##########*          *##########*          *##########*          *----------*
*----------*### 32 ###*  ------  *### 31 ###*          *### 30 ###*  ------  *### 29 ###*          *----------*
*----------*##########* |wwwwww| *##########*          *##########* |wwwwww| *##########*          *----------*
*----------*##########*  ------  *##########*          *##########*  ------  *##########*          *----------*
***************************************************************************************************************
*----------*          *##########*          *##########*          *##########*          *##########*----------*
*----------*          *##########*          *##########*          *##########*          *##########*----------*
*----------*          *### 28 ###*          *### 27 ###*          *### 26 ###*          *### 25 ###*----------*
*----------*          *##########*          *##########*          *##########*          *##########*----------*
*----------*          *##########*          *##########*          *##########*          *##########*----------*
***************************************************************************************************************
*----------*##########*          *##########*          *##########*          *##########*          *----------*
*----------*##########*          *##########*          *##########*          *##########*          *----------*
*----------*### 24 ###*          *### 23 ###*          *### 22 ###*          *### 21 ###*  ------  *----------*
*----------*##########*          *##########*          *##########*          *##########* |rrrrrr| *----------*
*----------*##########*          *##########*          *##########*          *##########*  ------  *----------*
***************************************************************************************************************
*----------*          *##########*          *##########*          *##########*          *##########*----------*
*----------*          *##########*          *##########*          *##########*          *##########*----------*
*----------*          *### 20 ###*          *### 19 ###*          *### 18 ###*          *### 17 ###*----------*
*----------*          *##########*          *##########*          *##########*          *##########*----------*
*----------*          *##########*          *##########*          *##########*          *##########*----------*
***************************************************************************************************************
*----------*##########*          *##########*          *##########*          *##########*          *----------*
*----------*##########*          *##########*          *##########*          *##########*          *----------*
*----------*### 16 ###*  ------  *### 15 ###*          *### 14 ###*          *### 13 ###*          *----------*
*----------*##########* |wwwwww| *##########*          *##########*          *##########*          *----------*
*----------*##########*  ------  *##########*          *##########*          *##########*          *----------*
***************************************************************************************************************
*----------*          *##########*          *##########*          *##########*          *##########*----------*
*----------*          *##########*          *##########*          *##########*          *##########*----------*
*----------*          *### 12 ###*          *### 11 ###*          *### 10 ###*  ------  *### 09 ###*----------*
*----------*          *##########*          *##########*          *##########* |wwwwww| *##########*----------*
*----------*          *##########*          *##########*          *##########*  ------  *##########*----------*
***************************************************************************************************************
*----------*##########*          *##########*          *##########*          *##########*          *----------*
*----------*##########*          *##########*          *##########*          *##########*          *----------*
*----------*### 08 ###*  ------  *### 07 ###*          *### 06 ###*          *### 05 ###*          *----------*
*----------*##########* |rrrrrr| *##########*          *##########*          *##########*          *----------*
*----------*##########*  ------  *##########*          *##########*          *##########*          *----------*
***************************************************************************************************************
*----------*          *##########*          *##########*          *##########*          *##########*----------*
*----------*          *##########*          *##########*          *##########*          *##########*----------*
*----------*  ------  *### 04 ###*  ------  *### 03 ###*          *### 02 ###*          *### 01 ###*----------*
*----------* |rrrrrr| *##########* |rrrrrr| *##########*          *##########*          *##########*----------*
*----------*  ------  *##########*  ------  *##########*          *##########*          *##########*----------*
***************************************************************************************************************
*----------*----------*----------*----------*----------*----------*----------*----------*----------*----------*
*----------*----------*----------*----------*----------*----------*----------*----------*----------*----------*
*----------*----------*----------*----------*----------*----------*----------*----------*----------*----------*
*----------*----------*----------*----------*----------*----------*----------*----------*----------*----------*
*----------*----------*----------*----------*----------*----------*----------*----------*----------*----------*
***************************************************************************************************************
« Last Edit: February 18, 2018, 04:52:29 pm by GothicChessInventor »