magic in fruit

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

magic in fruit

Post by ethanara »

How can i implement magic in an already existing program such as fruit? would it give any improvement?
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: magic in fruit

Post by hgm »

You will get Rybka! :wink:
ethanara
Posts: 134
Joined: Mon May 16, 2011 6:58 pm
Location: Denmark

Re: magic in fruit

Post by ethanara »

:p

but seriously, if i do it like toga, how should i do it?
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: magic in fruit

Post by hgm »

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 9:17 pm

Re: magic in fruit

Post by mcostalba »

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: 2643
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: magic in fruit

Post by smatovic »

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 6:58 pm
Location: Denmark

Re: magic in fruit

Post by ethanara »

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: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: magic in fruit

Post by Desperado »

@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: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: magic in fruit

Post by Desperado »

: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 4:51 pm

Re: magic in fruit

Post by georgerifkin »

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: