magic in fruit
Moderators: hgm, Rebel, chrisw
-
- Posts: 134
- Joined: Mon May 16, 2011 6:58 pm
- Location: Denmark
magic in fruit
How can i implement magic in an already existing program such as fruit? would it give any improvement?
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: magic in fruit
You will get Rybka!
-
- Posts: 134
- Joined: Mon May 16, 2011 6:58 pm
- Location: Denmark
Re: magic in fruit
:p
but seriously, if i do it like toga, how should i do it?
but seriously, if i do it like toga, how should i do it?
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: magic in fruit
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.
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: magic in fruit
Are you sure chess engine programming is an activity that could satisfy you? What about skateboarding or eating an ice cream instead ?ethanara wrote::p
but seriously, if i do it like toga, how should i do it?
-
- Posts: 2643
- Joined: Wed Mar 10, 2010 10:18 pm
- Location: Hamburg, Germany
- Full name: Srdja Matovic
Re: magic in fruit
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
if you get mailbox running than you can extend your engine with bitboards.
--
Srdja
-
- Posts: 134
- Joined: Mon May 16, 2011 6:58 pm
- Location: Denmark
Re: magic in fruit
yes, i am suremcostalba wrote:Are you sure chess engine programming is an activity that could satisfy you? What about skateboarding or eating an ice cream instead ?ethanara wrote::p
but seriously, if i do it like toga, how should i do it?
why do you ask?
-
- Posts: 879
- Joined: Mon Dec 15, 2008 11:45 am
Re: magic in fruit
@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
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
-
- Posts: 879
- Joined: Mon Dec 15, 2008 11:45 am
Re: magic in fruit
...
As we germans say " ich schmeiss mich gerade voll weg" ...
Hopefully my english is better to understand than this translation.
....
Micha
this is the automated english-german translation by google toolbar.@ 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
As we germans say " ich schmeiss mich gerade voll weg" ...
Hopefully my english is better to understand than this translation.
....
Micha
-
- Posts: 63
- Joined: Fri Jun 17, 2011 4:51 pm
Re: magic in fruit
i think this is a bad time of the year to make such a questionethanara wrote:How can i implement magic in an already existing program such as fruit? would it give any improvement?