Page 1 of 1

How to make my engine play in freechess.org?

PostPosted: 29 Dec 2005, 12:37
by Giuliano Ippoliti
Hi,

I've written a (very weak) chess engine compatible with xboard: my question is: how to make it play in FICS? I know I need a computer account, but I wonder if I have to write some additional code.

Thank you,

Giuliano

Re: How to make my engine play in freechess.org?

PostPosted: 29 Dec 2005, 15:19
by mathmoi
Giuliano Ippoliti wrote:Hi,

I've written a (very weak) chess engine compatible with xboard: my question is: how to make it play in FICS? I know I need a computer account, but I wonder if I have to write some additional code.

Thank you,

Giuliano


Hi Giuliano,

If you can play with your engine in Winboard or xboard, you can make it play online without writhing any more code.

You just have to start Winboard with a special command.

Here is mine :

C:\Program Files\WinBoard\winboard.exe -zp -ics -icshost freechess.org -zippyGameEnd='FinPartie\nresume\nseek 1 0 f\nseek 15 0 f\nseek 5 0 f\nfinger\n' -fd ""D:\Chess++"" -fcp InBetween -debug -icshelper timeseal -icslogon=""D:\Chess++\fics.ini"" -xexit"

You will find more informations about all the parameter here : http://www.tim-mann.org/xboard/zippy.README

Personnaly I use a more complex VB script that call this commend if and only if Winboard is not already running. It also send the string "Last" to the freechess windows, 15 minutes before I get home. This have for effect that Winboard will stop running after the current game, so my computer is avaible once I get home.

If you are interested I can post this script.

Mathieu Pag

Re: How to make my engine play in freechess.org?

PostPosted: 29 Dec 2005, 15:31
by Giuliano Ippoliti
mathmoi wrote:
You just have to start Winboard with a special command.

Here is mine :

C:\Program Files\WinBoard\winboard.exe -zp -ics -icshost freechess.org -zippyGameEnd='FinPartie\nresume\nseek 1 0 f\nseek 15 0 f\nseek 5 0 f\nfinger\n' -fd ""D:\Chess++"" -fcp InBetween -debug -icshelper timeseal -icslogon=""D:\Chess++\fics.ini"" -xexit"

Mathieu Pag?


Thank you very much!

Giuliano

Re: How to make my engine play in freechess.org?

PostPosted: 15 Jan 2006, 05:47
by smcracraft
mathmoi wrote:
Giuliano Ippoliti wrote:Hi,

I've written a (very weak) chess engine compatible with xboard: my question is: how to make it play in FICS? I know I need a computer account, but I wonder if I have to write some additional code.

Thank you,

Giuliano


Hi Giuliano,

If you can play with your engine in Winboard or xboard, you can make it play online without writhing any more code.

You just have to start Winboard with a special command.

Here is mine :

C:\Program Files\WinBoard\winboard.exe -zp -ics -icshost freechess.org -zippyGameEnd='FinPartie\nresume\nseek 1 0 f\nseek 15 0 f\nseek 5 0 f\nfinger\n' -fd ""D:\Chess++"" -fcp InBetween -debug -icshelper timeseal -icslogon=""D:\Chess++\fics.ini"" -xexit"

You will find more informations about all the parameter here : http://www.tim-mann.org/xboard/zippy.README

Personnaly I use a more complex VB script that call this commend if and only if Winboard is not already running. It also send the string "Last" to the freechess windows, 15 minutes before I get home. This have for effect that Winboard will stop running after the current game, so my computer is avaible once I get home.

If you are interested I can post this script.

Mathieu Pag?


Mathieu - I am interested. I am considering putting my program on
the chess servers FICS or ICS.

Re: How to make my engine play in freechess.org?

PostPosted: 15 Jan 2006, 06:43
by mathmoi
smcracraft wrote:
mathmoi wrote:
Giuliano Ippoliti wrote:Hi,

I've written a (very weak) chess engine compatible with xboard: my question is: how to make it play in FICS? I know I need a computer account, but I wonder if I have to write some additional code.

Thank you,

Giuliano


Hi Giuliano,

If you can play with your engine in Winboard or xboard, you can make it play online without writhing any more code.

You just have to start Winboard with a special command.

Here is mine :

C:\Program Files\WinBoard\winboard.exe -zp -ics -icshost freechess.org -zippyGameEnd='FinPartie\nresume\nseek 1 0 f\nseek 15 0 f\nseek 5 0 f\nfinger\n' -fd ""D:\Chess++"" -fcp InBetween -debug -icshelper timeseal -icslogon=""D:\Chess++\fics.ini"" -xexit"

You will find more informations about all the parameter here : http://www.tim-mann.org/xboard/zippy.README

Personnaly I use a more complex VB script that call this commend if and only if Winboard is not already running. It also send the string "Last" to the freechess windows, 15 minutes before I get home. This have for effect that Winboard will stop running after the current game, so my computer is avaible once I get home.

If you are interested I can post this script.

Mathieu Pag?


Mathieu - I am interested. I am considering putting my program on
the chess servers FICS or ICS.


Hi smcracraft,

here is the script:

Code: Select all
if not IsRunning() then
  do
    StartIfNotRunning()
    Sleep 20
  loop while (Time > "03:00:00" And Time < "07:00:00") Or (Time > "08:00:00" And Time < "16:00:00")
  EnvoyerLast
end if

public sub EnvoyerLast()
  Set wShell = CreateObject("WScript.Shell")
  wShell.AppActivate("ICS Interaction: ChessPlusPlus@freechess.org")
  Sleep 2
  wShell.SendKeys("last{ENTER}")
end sub

public sub StartIfNotRunning()
  dim path
  path = """C:\Program Files\WinBoard\winboard.exe"" -zp -ics -icshost freechess.org -zippyGameEnd='FinPartie\nresume\nseek 1 0 f\nseek 15 0 f\nseek 5 0 f\nfinger\n' -fd ""D:\Chess++"" -fcp InBetween -debug -icshelper timeseal -icslogon=""D:\Chess++\fics.ini"" -xexit"
  if not IsRunning() then
    Set oShell = CreateObject("WScript.Shell")
    oShell.Run path
  end if
end sub

public function IsRunning()
  sComputer = "."

  Set oWmi = GetObject("winmgmts:" _
      & "{impersonationLevel=impersonate}!\" _
      & sComputer & "\root\cimv2")


  sWmiQuery = "select Name from Win32_Process where name='winboard.exe'"
  Set oQResult = oWmi.ExecQuery(sWmiQuery)


  If oQResult.Count = 0 Then
     IsRunning = fase
  else
    IsRunning = true
  End If
end function

public sub Sleep(d)
  WScript.Sleep d * 1000
end sub


You may want to modify the command in StartIfNotRunning.

This condition allow my engine to play from 3am to 8pm and from 8am and 16pm. A Windows planned task run the script at 3:00 and 8:00.

Code: Select all
loop while (Time > "03:00:00" And Time < "07:00:00") Or (Time > "08:00:00" And Time < "16:00:00")


You will notice that before quitting the script send the command "last" to the winboard window. This is an alias that I use on FICS. On the command line I define "FinPartie" to be sent to the server after each game. This is an alias for "say thanks for playing". When the "last" command is run, "FinPartie" become an alias to "quit".

Code: Select all
alias FinPartie say thanks for playing.
alias last alias FinPartie quit


If you want any more help to set this up, feel free to post again or contact me by email.

Mathieu Pag?
mathieu.page@gmail.com

Re: How to make my engine play in freechess.org?

PostPosted: 16 Jan 2006, 15:21
by David Weller
Mathieu,

I tried getting a FICS account for my prg twice without success....

Any idea why? Do I need a human account first?

Thanks

Re: How to make my engine play in freechess.org?

PostPosted: 16 Jan 2006, 16:07
by Alessandro Scotti
David Weller wrote:I tried getting a FICS account for my prg twice without success....

Any idea why? Do I need a human account first?


Hi David,
I think having a human account is required. However, I have an account there ("ascotti") but also haven't been able to get an account for Kiwi (got no response at all). :(

Re: How to make my engine play in freechess.org?

PostPosted: 16 Jan 2006, 16:31
by David Weller
Thanks Alessandro,

I thought is was just me :(

-David

Re: How to make my engine play in freechess.org?

PostPosted: 16 Jan 2006, 16:36
by mathmoi
Alessandro Scotti wrote:
David Weller wrote:I tried getting a FICS account for my prg twice without success....

Any idea why? Do I need a human account first?


Hi David,
I think having a human account is required. However, I have an account there ("ascotti") but also haven't been able to get an account for Kiwi (got no response at all). :(


Hi Alessandro,

I already heard that kind of stories, however for me it went really fine, I got an account in a mater of hours. Maybe you could try to talk to an admin online.

Mathieu Pag