PDP-11 Chess VI (Belle) By Ken Thompson (1973) ported

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
Jim Ablett
Posts: 2454
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: PDP-11 Chess VI (Belle) By Ken Thompson (1973) ported

Post by Jim Ablett »

flok wrote: Sat Apr 04, 2026 10:42 am VERY VERY cool

Will you also publish the changed source code?
Hi Folkert,

It's in the download package. Unfortunately I had to patch some missing logic (some of original logic contained in ancient assembler I couldn't decifer) with some modern routines to get it working satisfactorily.
It's about 95% ported code / 5% new code. Playing strength around the original's reported elo rating of 1450.

Jim.
User avatar
F.Huber
Posts: 875
Joined: Thu Mar 09, 2006 4:50 pm
Location: Austria
Full name: Franz Huber

Re: PDP-11 Chess VI (Belle) By Ken Thompson (1973) ported

Post by F.Huber »

Alexander Schmidt wrote: Sat Apr 04, 2026 7:42 am RTFM :-)

You need to start the engine with the command line argument "-xboard".
Well, usually I don't RTFM ;) - when I saw that it supports the WB protocol, I assumed that the usual 'xboard' command (sent by Arena) would be enough to put it into xboard mode.
Jim Ablett wrote: Sat Apr 04, 2026 12:32 am Winboard fixed time per move tc wasn't working. Fixed now.
Yep, now it's working without problems! :)

Thanks to both of you,
Franz
Alexander Schmidt
Posts: 1241
Joined: Thu May 10, 2007 2:49 pm

Re: PDP-11 Chess VI (Belle) By Ken Thompson (1973) ported

Post by Alexander Schmidt »

F.Huber wrote: Sat Apr 04, 2026 1:04 pm
Alexander Schmidt wrote: Sat Apr 04, 2026 7:42 am RTFM :-)
You need to start the engine with the command line argument "-xboard".
Well, usually I don't RTFM ;) - when I saw that it supports the WB protocol, I assumed that the usual 'xboard' command (sent by Arena) would be enough to put it into xboard mode.
The same happened to me, I already opened talkchess for a complaint before I remembered to RTFM :-)

BTW, forgot to say THANKS to Jim for this jewel!
User avatar
Leto
Posts: 2149
Joined: Thu May 04, 2006 3:40 am
Location: Dune

Re: PDP-11 Chess VI (Belle) By Ken Thompson (1973) ported

Post by Leto »

Jim Ablett wrote: Fri Apr 03, 2026 8:15 pm Small update: enable engine to use gui opening books

Proton link:
https://drive.proton.me/urls/SYXDFSN22W#s412WevZRDVY

Smash link:
https://fromsmash.com/PDP11CHESS6JA64

Jim.
Seems this version can't run on the Fritz 20 GUI. Haven't tried the first version yet. UPDATE: Engine from first post is actually the same as the updated engine so I'm guessing you updated the links on the first post.
User avatar
Jim Ablett
Posts: 2454
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: PDP-11 Chess VI (Belle) By Ken Thompson (1973) ported

Post by Jim Ablett »

Leto wrote: Sat Apr 04, 2026 4:35 pm
Jim Ablett wrote: Fri Apr 03, 2026 8:15 pm Small update: enable engine to use gui opening books

Proton link:
https://drive.proton.me/urls/SYXDFSN22W#s412WevZRDVY

Smash link:
https://fromsmash.com/PDP11CHESS6JA64

Jim.
Seems this version can't run on the Fritz 20 GUI. Haven't tried the first version yet. UPDATE: Engine from first post is actually the same as the updated engine so I'm guessing you updated the links on the first post.
Engine only supports winboard protocol. Should work with wb2uci to get it working with Chessbase but I haven't tested it. Proton link doesn't change, just gets updated.

Jim.
cpeters
Posts: 232
Joined: Wed Feb 17, 2021 7:44 pm
Full name: Christian Petersen

Re: PDP-11 Chess VI (Belle) By Ken Thompson (1973) ported

Post by cpeters »

Hey Jim,

while it does compile on linux and computes there, on newer *BSDs the compiler stumples:

Code: Select all

io.c:21:13: error: too many arguments provided to function-like macro invocation
   21 | int getchar(void) {
      |             ^
/usr/include/stdio.h:512:9: note: macro 'getchar' defined here
  512 | #define getchar()       getc(stdin)
      |         ^
io.c:21:5: error: redefinition of 'getchar' as different kind of symbol
   21 | int getchar(void) {
      |     ^
/usr/include/stdio.h:286:6: note: previous definition is here
  286 | int      getchar(void);
      |          ^
io.c:21:12: error: expected ';' after top level declarator
   21 | int getchar(void) {
      |            ^
      |            ;
Happy Easter!
User avatar
Jim Ablett
Posts: 2454
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: PDP-11 Chess VI (Belle) By Ken Thompson (1973) ported

Post by Jim Ablett »

cpeters wrote: Sat Apr 04, 2026 10:20 pm Hey Jim,

while it does compile on linux and computes there, on newer *BSDs the compiler stumples:

Code: Select all

io.c:21:13: error: too many arguments provided to function-like macro invocation
   21 | int getchar(void) {
      |             ^
/usr/include/stdio.h:512:9: note: macro 'getchar' defined here
  512 | #define getchar()       getc(stdin)
      |         ^
io.c:21:5: error: redefinition of 'getchar' as different kind of symbol
   21 | int getchar(void) {
      |     ^
/usr/include/stdio.h:286:6: note: previous definition is here
  286 | int      getchar(void);
      |          ^
io.c:21:12: error: expected ';' after top level declarator
   21 | int getchar(void) {
      |            ^
      |            ;
Happy Easter!
Hi Christian, just #undef it

Code: Select all

#include <stdio.h>

#undef getchar
int getchar(void) {
Jim.
cpeters
Posts: 232
Joined: Wed Feb 17, 2021 7:44 pm
Full name: Christian Petersen

Re: PDP-11 Chess VI (Belle) By Ken Thompson (1973) ported

Post by cpeters »

Hello Jim,

this solves the problem of compilation, but belle cannot give a move after out of book:

Code: Select all

cp@bsd15: ~/schach/chess_6                                                                             
$ ./chess                                                                 [23:34:47]                   
PDP-11 Chess Engine                                                                                    
  Search depth: 8                                                                                      
  Opening book: ON                                                                                     
 
Book file: book.dat (274 bytes)                                                                        
Opening book loaded successfully                                                                       
usermove e2e4                                                                                          
eh?                                                                                                 
exit                                                                                                   
                                                                                                       
cp@bsd15: ~/schach/chess_6                                                                             
$ ./chess -xboard                                                         [23:35:19]                   
BOOK: book.dat size=274 bytes                                                                          
usermove e2e4                                                                                          
move g8f6                                                                                              
usermove e4e5
After this move it's occupied (computes 100% forever) but doesn't answer. And do I understand it correctly: The programm will not work in console (to a certain point: I can set options and show the board but beyond that...) as such/without speaking xboard-lingo with it (at least that's what I experienced under linux)?

Greetings
Alexander Schmidt
Posts: 1241
Joined: Thu May 10, 2007 2:49 pm

Re: PDP-11 Chess VI (Belle) By Ken Thompson (1973) ported

Post by Alexander Schmidt »

You should try it within a GUI or a complete set of Winboard commands.
User avatar
Jim Ablett
Posts: 2454
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: PDP-11 Chess VI (Belle) By Ken Thompson (1973) ported

Post by Jim Ablett »

cpeters wrote: Sun Apr 05, 2026 11:55 pm Hello Jim,

this solves the problem of compilation, but belle cannot give a move after out of book:

Code: Select all

cp@bsd15: ~/schach/chess_6                                                                             
$ ./chess                                                                 [23:34:47]                   
PDP-11 Chess Engine                                                                                    
  Search depth: 8                                                                                      
  Opening book: ON                                                                                     
 
Book file: book.dat (274 bytes)                                                                        
Opening book loaded successfully                                                                       
usermove e2e4                                                                                          
eh?                                                                                                 
exit                                                                                                   
                                                                                                       
cp@bsd15: ~/schach/chess_6                                                                             
$ ./chess -xboard                                                         [23:35:19]                   
BOOK: book.dat size=274 bytes                                                                          
usermove e2e4                                                                                          
move g8f6                                                                                              
usermove e4e5
After this move it's occupied (computes 100% forever) but doesn't answer. And do I understand it correctly: The programm will not work in console (to a certain point: I can set options and show the board but beyond that...) as such/without speaking xboard-lingo with it (at least that's what I experienced under linux)?

Greetings
Hi Christian,

Engine has it's own set of commands for playing a console game which are faithful to original program (a lot easier that using xboard commands) >

Code: Select all

Chess Engine User Commands


Game Control Commands
---------------------
Command	           Description

save	                   Saves the current game state to a file named "chess.out"
restore	           Restores a previously saved game from "chess.out"
exit	                   Exits the chess program
resign	           Resigns the current game (calls handle_hup)


Move Input Commands
-------------------
Command	           Description

[empty line]	   Pressing Enter with no input displays the current board position

Algebraic notation (e.g., e2e4)	Enters a move in algebraic format (enabled with mfmt on)
Descriptive notation (e.g., P/K4)	Enters a move in descriptive format (default when mfmt off)


Display Commands
----------------
Command	           Description

mfmt	           Toggles algebraic notation on/off
mfmt on	           Enables algebraic notation (e.g., "e2e4")
mfmt off	           Disables algebraic notation (uses descriptive format)
score	           Displays the current evaluation score for both sides
clock	           Shows the accumulated thinking time for both players
hint	                   Calculates and displays the best move and its evaluation
repeat	           Replays all moves made so far in the game


Game Analysis Commands
----------------------
Command	           Description

test	                   Toggles test mode (shows heuristic evaluations during search)
setup	           Enters board setup mode for custom positions
remove	           Takes back the last two moves (useful for analyzing alternatives)
first	                   Sets the engine to play first (White) - only valid at start of game
manual	           Toggles manual mode (human plays both sides)


Time Control Commands
---------------------
Command	           Description

time	                    Toggles time control on/off or shows current setting
time <seconds>     Sets the engine to think for specified seconds per move (e.g., time 10)


Opening Book Commands
---------------------
Command            Description

book	                   Toggles opening book on/off
book on               Enables opening book
book off	           Disables opening book


Special Commands
----------------
Command	           Description

o-o or oo        	   Castles kingside in descriptive notation
o-o-o or ooo	   Castles queenside in descriptive notation
alg	                   Alias for mfmt on (only valid at game start)


Xboard Commands
----------------
Command	           Description

-xboard	           Use xboard protocol
-nobook	           Disable opening book use


Command Examples
----------------

./Chess

mfmt on              # Enable algebraic notation
time 10               # Set 10 seconds thinking time
book off              # Disable opening book
e2e4                   # Play e4 as White

# After Black plays, get a hint
hint                     # Shows best move and evaluation

# Check thinking time
clock                  # Shows time used by each player

# Take back a move to try something else
remove               # Takes back last two moves

# Save the game for later
save                   # Saves to chess.out

# Exit the program
exit


Default Settings
    • Algebraic notation: OFF (uses descriptive format)
    • Opening book: ON
    • Time control: OFF (uses fixed depth search)
    • Manual mode: OFF (engine plays)
    • Test mode: OFF
    • Default depth: 8 ply
Notes
    • Commands are case-sensitive and must be entered in lowercase
    • Pressing Enter with no input shows the current board position
    • The first command only works at the start of a game
    • The remove command removes two moves (one full turn) to return to a previous position
    • When time control is enabled, the engine ignores the fixed depth setting and searches until time runs out

Jim.