a new Open Source Web UI for Crafty

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Andres Valverde
Posts: 580
Joined: Sun Feb 18, 2007 11:07 pm
Location: Almeria. SPAIN
Full name: Andres Valverde Toresano

Re: a new Open Source Web UI for Crafty

Post by Andres Valverde »

Only two words : im-pressive !!

Thanks for your work and for sharing
Saludos, Andres
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: a new Open Source Web UI for Crafty

Post by Don »

ornicar wrote:Hello,

I'm having fun developing a Chess user interface for the web: http://lichess.org
It will always be free and open source, and will never contain advertisement. It's not a commercial project, I make it for love of programming and Chess.

It requires no registration, nor flash.

I hope to get some feedback from you. Do you like it?
It's awesome! Very nicely done and clean.
User avatar
jshriver
Posts: 1358
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: a new Open Source Web UI for Crafty

Post by jshriver »

Brilliant! How did you do that without Flash?
ornicar

Re: a new Open Source Web UI for Crafty

Post by ornicar »

Thanks!
Actually, HTML, CSS and JavaScript are good enough to make the interface.
I use the JavaScript framework jQuery, which makes it a lot easier.

And the backend is built with the very-new and not-so-well-documented-yet PHP framework Symfony 2!
gladius
Posts: 568
Joined: Tue Dec 12, 2006 10:10 am
Full name: Gary Linscott

Re: a new Open Source Web UI for Crafty

Post by gladius »

Very nice :). I wonder if you would like to include a javascript player as well? On IE/FF, it's sadly not too strong (still decent), but on Chrome/Safari, it does pretty well.

The AI is up at http://forwardcoding.com/projects/ajaxc ... bochess.js. Saves on some server resources for the players that can't match Crafty :).
ornicar

Re: a new Open Source Web UI for Crafty

Post by ornicar »

Looks great!
Can I find a usage example somewhere?
gladius
Posts: 568
Joined: Tue Dec 12, 2006 10:10 am
Full name: Gary Linscott

Re: a new Open Source Web UI for Crafty

Post by gladius »

Sure, it's up at http://forwardcoding.com/projects/ajaxchess/chess.html.

Basically, you need to call ResetGame() to initialize state. You can then call InitializeFromFen(fenString) to go to a position. Finally, Search() takes a callback, which it calls once it is done. The callback has the best move, time taken and nodes searched. Set "g_timeout" to determine the duration in milliseconds of the search.

And that's about it :).