How to make my engine play in freechess.org?

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

How to make my engine play in freechess.org?

Postby Giuliano Ippoliti » 29 Dec 2005, 12:37

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
Giuliano Ippoliti
 
Posts: 4
Joined: 29 Dec 2005, 12:30

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

Postby mathmoi » 29 Dec 2005, 15:19

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
mathmoi
 
Posts: 37
Joined: 30 Mar 2005, 21:23

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

Postby Giuliano Ippoliti » 29 Dec 2005, 15:31

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
Il faut secouer la vie, autrement elle nous ronge.
[ Stendhal ]
Giuliano Ippoliti
 
Posts: 4
Joined: 29 Dec 2005, 12:30

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

Postby smcracraft » 15 Jan 2006, 05:47

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.
smcracraft
 
Posts: 65
Joined: 15 Jan 2006, 05:38

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

Postby mathmoi » 15 Jan 2006, 06:43

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
mathmoi
 
Posts: 37
Joined: 30 Mar 2005, 21:23

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

Postby David Weller » 16 Jan 2006, 15:21

Mathieu,

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

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

Thanks
User avatar
David Weller
 
Posts: 135
Joined: 26 Sep 2004, 20:30
Location: USA

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

Postby Alessandro Scotti » 16 Jan 2006, 16:07

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). :(
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

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

Postby David Weller » 16 Jan 2006, 16:31

Thanks Alessandro,

I thought is was just me :(

-David
User avatar
David Weller
 
Posts: 135
Joined: 26 Sep 2004, 20:30
Location: USA

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

Postby mathmoi » 16 Jan 2006, 16:36

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
mathmoi
 
Posts: 37
Joined: 30 Mar 2005, 21:23


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 1 guest