After finding out how to access the UCI interface with the help of an introductory video, it is now possible to write a chess engine with Small Basic that can be integrated into chess programs.
The C# videos and further information can be found in the following thread: https://litdev.uk/mybb/showthread.php?tid=74
But there is still a long way to go to the first usable engine.
The 4 episodes of the C# video tutorial must be implemented in Small Basic and in C# programs.
Episode 1: Hello World
Integrating the exe file as an engine into a chess program is described in the C# thread and in the videos.
What is also annoying is that the text window cannot be hidden and it has no content.
But since it can be moved to the side, it is still acceptable.
Update:
With the features LDTextWindow.UpdateShowHide = "False" and LDTextWindow.Minimise() the text window can be minimized to the taskbar.
This requires the Litdev extension 1.2.28.0 or higher. Alternatively, the two lines can be commented out and the text window will appear on the screen.
Note:
If the SB_UCI.exe engine is distributed or copied to another directory, the DLLs Litdev.dll and SmallBasicLibrary.dll must also be included!
The C# videos and further information can be found in the following thread: https://litdev.uk/mybb/showthread.php?tid=74
But there is still a long way to go to the first usable engine.
The 4 episodes of the C# video tutorial must be implemented in Small Basic and in C# programs.
Episode 1: Hello World
Code:
'Position Textwindow
TextWindow.Left = Desktop.Width/2+1
TextWindow.Top = Desktop.Height/2+200
'Movelist for black
Move[1] = "bestmove e7e5"
Move[2] = "bestmove a7a6"
Move[3] = "bestmove b7b5"
Move[4] = "bestmove g8f6"
Move[5] = "bestmove g7g6"
Move[6] = "bestmove h7h5"
Move[7] = "bestmove f8g7"
Move[8] = "bestmove b8c6"
Movecount = 1
'LDTextWindow.Hide()
LDTextWindow.UpdateShowHide = "False"
LDTextWindow.Minimise()
While ("True")
'TextWindow.PauseIfVisible()
commandline = TextWindow.Read()
command = LDText.Split(commandline," ")
if(command[1] = "uci") Then
TextWindow.WriteLine("uciok")
ElseIf(command[1] = "isready") Then
TextWindow.WriteLine("readyok")
ElseIf(command[1] = "position") Then
'Board Update
elseif(command[1] = "go") Then
'TextWindow.WriteLine("bestmove e7e5")
TextWindow.WriteLine(Move[Movecount])
Movecount = Movecount + 1
Else
TextWindow.WriteLine("info string "+ commandline)
endif
Program.Delay(7)
EndWhile
Integrating the exe file as an engine into a chess program is described in the C# thread and in the videos.
What is also annoying is that the text window cannot be hidden and it has no content.
But since it can be moved to the side, it is still acceptable.
Update:
With the features LDTextWindow.UpdateShowHide = "False" and LDTextWindow.Minimise() the text window can be minimized to the taskbar.
This requires the Litdev extension 1.2.28.0 or higher. Alternatively, the two lines can be commented out and the text window will appear on the screen.
Note:
If the SB_UCI.exe engine is distributed or copied to another directory, the DLLs Litdev.dll and SmallBasicLibrary.dll must also be included!