magic in fruit

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
ethanara
Posts: 134
Joined: Mon May 16, 2011 4:58 pm
Location: Denmark
Contact:

magic in fruit

Post by ethanara » Fri Jul 01, 2011 4:58 pm

How can i implement magic in an already existing program such as fruit? would it give any improvement?

User avatar
hgm
Posts: 23486
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: magic in fruit

Post by hgm » Fri Jul 01, 2011 5:08 pm

You will get Rybka! :wink:

ethanara
Posts: 134
Joined: Mon May 16, 2011 4:58 pm
Location: Denmark
Contact:

Re: magic in fruit

Post by ethanara » Fri Jul 01, 2011 5:15 pm

:p

but seriously, if i do it like toga, how should i do it?

User avatar
hgm
Posts: 23486
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: magic in fruit

Post by hgm » Fri Jul 01, 2011 5:20 pm

I've never seen Toga. I have barely seen Fruit, but I have seen its eval. I guess you would have to rewrite that more or less completely, and if you get any speedup, you must get it there. One of the most expensive parts of the Fruit eval is the mobility, counting the number of moves of each piece. This is where magics can help, if you prepare a lookup for the number of moves.

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 7:17 pm

Re: magic in fruit

Post by mcostalba » Fri Jul 01, 2011 6:30 pm

ethanara wrote::p

but seriously, if i do it like toga, how should i do it?
Are you sure chess engine programming is an activity that could satisfy you? What about skateboarding or eating an ice cream instead ? :-)

smatovic
Posts: 784
Joined: Wed Mar 10, 2010 9:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic
Contact:

Re: magic in fruit

Post by smatovic » Fri Jul 01, 2011 7:17 pm

if you are new to chessprogramming i suggest to start with an easier to implement move generator and board presentation like mailbox or 0x88.

if you get mailbox running than you can extend your engine with bitboards.

--
Srdja

ethanara
Posts: 134
Joined: Mon May 16, 2011 4:58 pm
Location: Denmark
Contact:

Re: magic in fruit

Post by ethanara » Fri Jul 01, 2011 7:45 pm

mcostalba wrote:
ethanara wrote::p

but seriously, if i do it like toga, how should i do it?
Are you sure chess engine programming is an activity that could satisfy you? What about skateboarding or eating an ice cream instead ? :-)
yes, i am sure
why do you ask?

User avatar
Desperado
Posts: 638
Joined: Mon Dec 15, 2008 10:45 am

Re: magic in fruit

Post by Desperado » Fri Jul 01, 2011 7:58 pm

@ethan

Maybe http://www.sluijten.com/winglet/ is a good starting point.

Well, if you really want to start with bit-board-representation, you do
not need necessarily any idea of magics,rotated or any other advanced movegeneration technique.

You first need a good understanding of how bitboards work in general
and how to use them. Therefore you can write at startup little routines,
(like others use for example to initialize the magic-database) that directly
compute moves(attacksets). Yes, of course that will be slow implementation, but _transparent_ and _easy_ to follow.

if everything works, improve the attackGetter routines step by step, and choose your favorite technique.

@Srdja

of course a good alternative :) !
But i think, having a set of 13 bitboards with additional squareCentric array
and directly computing the moves can not be much harder, especially if your goal is to become "bitboarder".

Michael

User avatar
Desperado
Posts: 638
Joined: Mon Dec 15, 2008 10:45 am

Re: magic in fruit

Post by Desperado » Sat Jul 02, 2011 9:55 am

:lol: :lol: :lol: ... :lol:
@ Ethan Vielleicht http://www.sluijten.com/winglet/ ein guter Ausgangspunkt ist. Nun, wenn Sie wirklich wollen, mit Bit-board-Darstellung starten, brauchen Sie nicht unbedingt eine Vorstellung von Magie, gedreht oder eine andere Fortgeschrittene movegeneration Technik. Sie müssen zunächst ein gutes Verständnis davon, wie bitboards Arbeit im Allgemeinen und wie man sie benutzt. Deshalb können Sie beim Start wenig Routinen schreiben, (wie andere zum Beispiel verwenden, um den Zauber-Datenbank zu initialisieren), die direkt berechnen bewegt (attacksets). Ja, natürlich, dass die langsame Umsetzung, aber _transparent_ und _easy_ zu folgen. wenn alles funktioniert, verbessern die attackGetter Routinen Schritt für Schritt, und wählen Sie Ihre bevorzugte Technik. @ Srdja natürlich eine gute Alternative ! Aber ich denke, mit einem Satz von 13 bitboards mit zusätzlichen squareCentric Array und direkt die Berechnung der bewegt sich nicht viel schwieriger sein, besonders wenn es Ihr Ziel, sich "bitboarder" ist. Michael
this is the automated english-german translation by google toolbar.

As we germans say " ich schmeiss mich gerade voll weg" ...

Hopefully my english is better to understand than this translation.

:lol: :lol: :lol: ....

Micha

georgerifkin
Posts: 63
Joined: Fri Jun 17, 2011 2:51 pm

Re: magic in fruit

Post by georgerifkin » Sat Jul 02, 2011 10:13 am

ethanara wrote:How can i implement magic in an already existing program such as fruit? would it give any improvement?
i think this is a bad time of the year to make such a question :lol:

Post Reply