Check out Glinski's Hexagonal Chess, our featured variant for May, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Latest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Later Reverse Order Earlier
Capablanca Random Chess. Randomized setup for Capablanca chess. (10x8, Cells: 80) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sat, Dec 4, 2021 05:13 AM EST:

I have made an attempt to implement Fischer castling in the Interactive Diagram. There is no special XBetza notation for this; a shuffle game has to be specified with a 'nominal' setup. This setup defines (together with the XBetza normal castling definition) where the king must end up, and what the castling partners are (the corner pieces, which must be of equal type). If such a castling is defined, any shuffle that involves the king will then be restricted to make the king end up between the castling partners, and will activate Fischer castling.

To support the shuffle rules of Capablanca Random Chess I enhanced the Diagram's shuffle feature: An exclamation point before a piece in a shuffle specification now either means that pieces of that type should be equally distributed over square shades, or, when there only is one such piece, that it must remain on the shade it is already on. This way Q and A can be forced on different shades by putting them so in the nominal position, and order an extra shuffle of only Q and A to determine which one goes on which shade. The shuffle specs are thus QA,N!BR!AC!QK.

Initially a Diagram always shows the nominal position; there is no spontaneous shuffle. To shuffle you have to press 'Restart' in the AI control bar.

[Editor's Note: Disabling this diagram to keep it from interfering with the one on the page.]

<script type="text/javascript" src="/membergraphics/MSinteractive-diagrams/betza.js?nocache=true">
</script>
<div class="idiagram">
files=10
ranks=8
promoZone=1
promoChoice=NBRQAC
graphicsDir=/membergraphics/MSelven-chess/
squareSize=35
graphicsType=png
shuffle=QA,N!BR!AC!QK
pawn:P:ifmnDfmWfceF:pawn:a2,b2,c2,d2,e2,f2,g2,h2,i2,j2,,a7,b7,c7,d7,e7,f7,g7,h7,i7,j7
knight:N:N:knight:c1,h1,,c8,h8
bishop:B:B:bishop:d1,g1,,d8,g8
rook:R:R:rook:a1,j1,,a8,j8
queen:Q:Q:queen:e1,,e8
archbishop:A:BN::b1,,b8
chancellor:C:RN:chancellor:i1,,i8
king:K:KisO3:king:f1,,f8
</div>

H. G. Muller wrote on Thu, Dec 2, 2021 02:26 PM EST in reply to Thomas from 01:04 PM:

Umm, I did not even know this rule existed. WinBoard restricts the shuffle only to have the Bishops on different colors. I agree the rule makes no sense. I have also seen descriptions that did not allow the Bishops to be on adjacent squares. (That also seemed to make little sense.)

The Interactive Diagram would have to struggle to enforce this rule, because there is no way to tell it directly that a pair of pieces of different types would have to be placed on different square shades. As a work-around you could 'mark' the shades by piece type, by defining the nominal start position with a back rank RBRBNKNCQA, so that RNQ are on dark squares, and BKCA on light. You can then order a sequence of shuffles, RNQ,BKCA,QA,!BNRKC .

The first shuffle solely serves to put Q on a random dark square, the second to put A on a random light square, and the third then randomly swaps the two. The remaining pieces then have to be shuffled the usual way, i.e. the Bishops would have to go on opposit shades (indicated by the ! prefix).

I guess it would be useful to extend the shuffling capabilities of the Diagram with a prefix to indicate the piece should stay on the same color as it was in the nominal setup. Sy This would be indicated by #, then the shuffle instructions could be K#QC#AR!BN,QA, with a nominal setup where Q and A start on different shades.


Thomas wrote on Thu, Dec 2, 2021 01:04 PM EST:Excellent ★★★★★

But why the limitation to set up queen and archbishop on different coloured squares, when they can change the square colour by moving like rook resp. knight?


💡📝Reinhard Scharnagl wrote on Sat, Jan 26, 2008 03:52 AM EST:
In the case of a real free castling there is the possibility to also have castlings, wherein the king is making only one single step. Then an encoding as e.g. Kd1 is not sufficient to distinguish a castling move from a simple King's move. Moreover in traditional chess O-O and O-O-O is used. Thus the representation should be very related to that. using O-O-x has more common parts to those traditional forms than O-x. Thus I am preferring that. 
By posting here I intended to investigate the status quo of writing down castling moves in variants, before I would start to implement such abilities in SMIRF's successor application Octopus.

aronymous wrote on Fri, Jan 25, 2008 06:11 PM EST:
How about this : Ko-a for castling to the a-file , and Ko-b for castling the b file, and so on ? or O-a , O-b .. etc

💡📝Reinhard Scharnagl wrote on Fri, Jan 25, 2008 12:02 PM EST:
Hi Sam, there seem to be different kinds of free castling, thus including one-step-castlings. This is one reason and another, because a castling should be obviously in its notation Thus I would prefer adaptions to the classic notation. Another question is, that a GUI should be more flexible in accepting several kinds of notations. Nevertheless I try to unify such notations into a common mimic.

Sam Trenholme wrote on Fri, Jan 25, 2008 11:48 AM EST:
For my own Schoolbook chess, which supports free castling, I just notate a castling move as the square the king moves to; for example, Kc1. Where the rook moves to is determined by where the king moves to, and the only time the king can move more than one square is when he castles, so this notation is unambiguous.

- Sam


aronymous wrote on Fri, Jan 25, 2008 09:42 AM EST:
I suggest notating is as a King's move. Like 'Kb1'. This is a standard way to notate normal castling, btw.

Joe Joyce wrote on Fri, Jan 25, 2008 09:28 AM EST:
Hi, Reinhard. Good that you're making free castling available in SMIRF. You might want to generalize all castling as 'OOx', where 'x' is the column ended upon, for consistency.

💡📝Reinhard Scharnagl wrote on Fri, Jan 25, 2008 08:33 AM EST:
Well, having no suggestions yet, I made some myself:

All castlings placing the King three squares from the left white side will be written as O-O-O (standard).
All castlings placing the King two squares from the right white side will be written as O-O (standard).
All other castlings will be written e.g. O-O-b terminated by the King's target column letter, here 'b'.

Would that be acceptable?

💡📝Reinhard Scharnagl wrote on Fri, Jan 25, 2008 05:26 AM EST:
I am just thinking it over, whether to support also free castling in SMIRF - the variation, where the King makes at least two steps, to enable an unambigious move entering via a GUI. Then a lot of other chess variants would be able to be supported. But there is a question left: how is the regular notation for those castlings? O-O and O-O-O would not at all be sufficient here.

SMIRF is downloadable at: http://www.10x8.net/down/SmNewSetup.exe

Sam Trenholme wrote on Thu, Aug 16, 2007 01:56 PM EDT:
I just gave this program a test spin last night. So far, it looks good; its mating power and willingness to make sacrifices makes for some very exciting games to look at. I'm glad to see an exciting Chess variant player.

Zillions' game playing style is, in comparison, sterile and drawish. To make a comparison, Zillions is Kramnik's ice and SMIRF is Topalov's fire.


💡📝Reinhard Scharnagl wrote on Wed, Aug 15, 2007 07:50 AM EDT:
Hi Sam, again I provide a link for chess variant insiders like you: link to locally make SMIRF BC-168b available. As often repeated there also is an improved version for real donators. ;-) Best regards, Reinhard.

P.S.: could you please specify the PGN notation concerning your 10x8 extended castling rules? Because traditional O-O or O-O-O would not be always sufficient, as I presume.


Sam Trenholme wrote on Mon, Aug 13, 2007 11:57 AM EDT:Excellent ★★★★★
It saddens me to see that the excellent SMIRF chess variant engine is no longer available for download. Fortunatly, I was able to download a copy of SMIRF when it was still free downloadable, and have finally had a chance to give this chess engine a test spin. The variant I have SMIRF play is my own 'Schoolbook Chess' (CRC setup #27621 with different castling rules).

SMIRF has a very romantic style of play, making bold sacrifices. For example, in thie game against Zillions of Games, where both sides have five seconds to make a move on a Pentium Core Duo 1.5Ghz, SMIRF has the black pieces and makes several bold sacrifices before finally delivering the mating blow to white:

1. e4 Ng6 2. f3 Nd6 3. d3 Af6 4. NI3 e6 5. Ng4 Ah5 6. I4 AI6 7. Nb3 h5 8. Nc5 Qc8 9. Ixh5 Axh5 10. NI3 Af4 11. g3 Ah6 12. h3 b6 13. Ng4 Aj5 14. Nb3 Mh8 15. Af2 BI6 16. Bj4


SMIRF gets ready to make his first sacrifice.

16... Mh5!? 17. NI3 Mxj4 18. Nxj5 Bxj5 19. Ag1 Mh5 20. Kf2 Mg5 21. f4


SMIRF now sacrifices both of his knights to continue the attack on White's King.

21... Nxe4+! 22. dxe4 Mxe4+ 23. Kg2 Nxf4+! 24. gxf4 Mxf4+ 25. Kh2 KI8 26. c3+ f5 27. MI5


SMIRF sacrifces his bishop in order to keep his attack lively.

27... j6! 28. Mxj5 Qb7 29. Bf3 Qxf3 30. Axf3 Mxf3+ 31. Kg2 Mf4+ 32. Kh2


Black can now force mate; finding this mate is left as an exercise to the reader.

In another game, SMIRF plays ChessV, with SMIRF having the white pieces and each side given 30 seconds to decide their move on a Pentium Core Duo 1.5Ghz. Here is how that game went:

1. Ng3 e5 2. Mh3 Ne7 3. Nd3 Neg6 4. e3 d6 5. f4 exf4 6. exf4 Ad7 7. Af2 Axh3 8. Axh3 Ke8 9. Bg4 Bh4 10. Bd7+ Kd8 11. Qe1 Ne7 12. Bf2 Nhg6 13. Nf5 Bxf2 14. Kxf2 c6 15. Nxe7 Nxe7 16. Qe2 d5 17. Nc5 Ng6 18. Rje1 Kc7 19. Bxc6 Kxc6


At this point, even though White is down material, he can force mate. The mate, again, is left as an exercise for the reader.


Mark Thompson wrote on Sun, Aug 12, 2007 08:41 PM EDT:
Today in Germany a law forbidding vaguely-defined 'hacker tools' went into effect.

link

This is a real DEATHBLOW to computer-using German people, because it makes no distinction 'between, for example, a password cracker and a password recovery tool, or a utility designed to run denial of service attacks and one designed to stress-test a network.'

What may be worse, 'While making life more difficult for security consultants and sys admins, the new laws will, paradoxically, make it easier for police to use hacking tactics in gathering intelligence on suspects.'

link

Please try to avoid Germany's becoming a totalitarian country. Until this law is rescinded, I promise to drink no more Beck's--nothing but Heineken and Guinness. I hope you'll do the same.


💡📝Reinhard Scharnagl wrote on Sat, Aug 4, 2007 03:23 PM EDT:
A real DEATHBLOW to email contacts with US American people

Well, because I am not interested in having my email postings 'legally' verified by the CIA, NSA and other 'peace securing' organisations, even without finding any suspicion against my person, I will no longer correspond with people from USA by email. Please try to avoid the USA to become a totalitarian country. 

So please join boycotting that raising freedom killing USA practice. 

Reinhard.

Stephen Stockman wrote on Thu, Sep 21, 2006 12:53 AM EDT:Excellent ★★★★★
u could be the lucky 12000'th visitor at my 4-way chess web-site

💡📝Reinhard Scharnagl wrote on Wed, Sep 20, 2006 01:36 PM EDT:
Hi Sam. Please note, that there is a rule number one (especially its second
part): 

1. the bishops have to be placed upon different colored squares; same rule
applies to the implicite bishop pieces: queen and archbishop (aligned to
FRC)

A reader wrote on Wed, Sep 20, 2006 12:42 PM EDT:
Er, ..

'the queen is the the left of the queen.'

'the king is to the left of the king,'

This doesn't make sense !!

Sam Trenholme wrote on Wed, Sep 20, 2006 10:58 AM EDT:
OK, I've looked at the list and can sorta see why you had 12118 setups when I had 9820 setups. First of all, I consider mirror image setups to be identical, so I have removed them by requiring the queen to be left of the king (from white's side of the board) in all of my setups. This reduces the number of possible setups from 252,000 to 126,000. I note that you consider a setup and its mirror different--which it can be given certain castling rules.

I modified your list of crc setups to only show the ones where the queen is the the left of the king. For some reason, your list of 12118 setups has 6056 setups with the queen to the left of the king, and 6062 setups with the Queen to the right of the king.

Once I did this, I noted that there are some 3764 possible opening setups, where all the pawns are guarded, the king is to the left of the queen, and where there are no bishops together, that are not on your list of possible setups. I have put this list here:

http://www.samiam.org/chessvariants/crc-why-not.txt

This list uses 'M' for the rook + knight piece and 'A' for the knight + bishop piece.

- Sam

Edit: Fixed 'queen' and 'king' wording.


💡📝Reinhard Scharnagl wrote on Mon, Sep 18, 2006 06:01 PM EDT:
Hi Sam, here is a link to all those 12118 valid CRC arrays:

http://www.chessbox.de/Down/crc_valid.rar

Which of them is not correct or doubled? Of course, I am not perfect, but
I need a precise hint if need be, if something really should be wrong.

Sam Trenholme wrote on Mon, Sep 18, 2006 01:51 PM EDT:
'There 12118 positions still are remaining'

My program counts 9819. Here are my restrictions:

* All pawns defended

* King between rooks

* No bishops together

* No RNBQMKABNR setup (patented; M = Rook + Knight; A = Bishop + Knight)

I'm curious where the number 12,118 comes from.

- Sam


💡📝Reinhard Scharnagl wrote on Fri, Apr 14, 2006 03:39 AM EDT:
There has been a question, why SMIRF is supporting two other castling
modes than merely the standard castling. Despite of that this is exceeding
genuine CRC questions, here is the answer: SMIRF also is supporting Janus
Chess, which needs 's' = symmetric castling, and MBC (Embassy), which
needs 'm' = modern castling.

CRC follows the traditioal approach to place the king after castlings
either two squares distant from alpha-side or one square from omega-side.

Derek Nalls wrote on Fri, Apr 14, 2006 02:02 AM EDT:
Out of the 3 options offerred for castling in SMIRF, I chose 'symmetric'
castling for Optimized Chess 8H x 10W.  This destroyed my plan to compare
the strengths of SMIRF and Gothic Vortex III at this game by letting them
fight it out at 3 minutes per move since the latter program exclusively
supports traditional or 'normal' castling as exists in Gothic Chess.

It is particularly gracious of Scharnagl to support symmetric castling
within SMIRF, esp. since he has stated clearly that he personally prefers
normal castling.  To date, I suspect that a good reason to prefer
symmetric castling has not been explained.

Any unique game is singular in nature, regardless of whether it exhibits
an east-west symmetry or asymmetry.  However, unlike E-W symmetrical games
which always exist as 1 unified, opening setup, E-W asymmetrical games are
split so they always exist irreducibly as 2 mirror-image opening setups
which can be transposed into one another.  Obviously, neither one is any
more or less proper than the other.  

Of course, most inventors only offer 1 of these 2 mirror-image, opening
setups as the asymmetrical game and most players, on the rare occasion
that a choice between 2 is offerred, will always prefer to learn using
just 1 of them.

Ideally, the king would be perfectly centered by E-W measure so that
castling would naturally be the same between the 'Mirror I' and 'Mirror
II' variants of Opti Chess.  Unfortunately, this is obviously impossible
as the '10W' in the game title gives a strong clue.  An odd, NOT even,
number of files must exist for it to be possible to perfectly center any
single piece E-W.

The opening setups in Mirror I and Mirror II have the 2 rooks balanced
perfectly, equidistantly, symmetrically E-W from the center of the board.

The opening setups in Mirror I and Mirror II have the king as close to the
exact E-W center of the board as possible which is unfortunately, the line
dividing the 5th and 6th files.  Consequently, the king rests on the 6th
file square in Mirror I and the 5th file square in Mirror II.

With normal castling, the king and rook will end-up on destination squares
that are asymmetrical from the exact E-W center of the board within both
variants AND on destination squares that are different when comparing both
variants.

With symmetric castling, the king and rook will end-up on destination
squares that are symmetrical and identical within and between both
variants.  Essentially, a simple average of the results of normal castling
for Mirror I & II is taken which yields whole numbers.  

By contrast, one can wonder (with dark humor) how the person(s) who
established the standard for normal castling kept from going crazy when
you realize ...

In deciding exactly where to drop the pieces kingside and queenside, in
turn, they had to decide whether it was more proper to round-off exactly
1/2 square's distance to zero square's distance or 1 square's distance.
Even Dr. Mark Thompson could not answer that one!

Derek Nalls wrote on Sat, Apr 8, 2006 11:00 PM EDT:
optimized chess 8H x 10W
http://www.symmetryperfect.com/shots/opti/

💡📝Reinhard Scharnagl wrote on Sat, Apr 8, 2006 07:20 AM EDT:
RULE TO BE ADDED 

After experimenting with CRC for several months I detected that there could
be some special positions, which might be too advantageous for white. They
belong to a subclass of positions, where the pair of bishops is
neighboured. Thus I as the author have decided to add the following
selection rule: 'positions with neighboured bishops have to be avoided.'
There 12118 positions still are remaining.

💡📝Reinhard Scharnagl wrote on Wed, Apr 5, 2006 01:55 PM EDT:
Hi Derek, SMIRF is still beta. It is designed to be shareware in the form of donationware. On its download page there is the possibility to make a donation via paypal to support the project. Any serious donation will be answered by sending back a permanent personal key, which will stay valid for follow up versions. Without a key SMIRF will always answer immediately, thus not showing its full strength. See: SMIRF download page. Because of Gothic's patent, GC currently is not supported directly, nevertheless any 8x8 or 10x8 position could be set up manually.

Derek Nalls wrote on Wed, Apr 5, 2006 12:47 PM EDT:
How much does SMIRF cost (in US dollars)?

💡📝Reinhard Scharnagl wrote on Wed, Apr 5, 2006 01:45 AM EDT:
Hi Sam, please note, that SMIRF's evaluation model currently has been changed (and as I hope simplified) concerning it's third basic mobility component. Thus the values you mentioned are no more identic to the actual, sorry. (The third component is still subject to change, I tend to simplify it even more.)

P=1.000, N=3.053, B=3.500, K=3.722, R=5.815, A=6.858, C=8.870, Q=9.617

See for it at the: SMIRF-Site

Sam Trenholme wrote on Wed, Apr 5, 2006 12:42 AM EDT:
Richard,

Here is some information I have on the value of the Carrera pieces which I came up with when designing my own Carrera-esque opening setup:

Here is a table of four different derived values for the pieces, obtained from three different chess variant playing computer programs and one other source.

PieceChessVSMIRFZillionsAberg
Pawn 1.0001.0001.0001.000
Knight 2.5003.0562.3623.000
Bishop 3.2503.6902.8593.300
Rook 4.7005.6044.2625.000
Queen 8.7509.5587.0609.000
Archbishop 6.5006.8385.1276.800
Marshall 8.2508.8326.6598.700

The ChessV numbers were obtained by looking at the source code for ChessV. The SMIRF values, derived by Reinhard Scharnagl for his SMIRF chess computer program, were obtained from this web page. The Zillions of Games' values were obtained by looking at the values of pieces by right-clicking on them after loading a fresh Schoolbook zrf file, and before moving any pieces. Aberg's figures come from right here on the variants server.

All four agree on the following:

  • A bishop is about a half-pawn more valuable than a knight.
  • Two knights are worth more than a rook.
  • An archbishop is worth more than two knights.
  • A marshall is worth more than an archbishop.
  • A queen is worth more than a marshall.
  • Two rooks are worth more than a queen.
  • A marshall is worth more than a rook and knight.
  • A marshall is worth more than two bishops.
  • A rook and knight are worth more than an archbishop.
The verdict is still out on some other exchanges:
  • A rook and bishop vs. a queen.
  • A rook and bishop vs. a marshall.
  • A bishop and knight vs. an archbishop.
  • Two bishops vs. an archbishop (Two bishops are probably worth more).
- Sam

Derek Nalls wrote on Tue, Apr 4, 2006 10:34 PM EDT:
Thank you for publishing my results.  Doing so implies that you have some
trust in my calculation method even as it differs from your own and the
English-German language barrier creates apprehension.

We are all trying to reach the same destination (accurate relative piece
values).  We just have different reasons for taking different roads in
pursuit of it.  Unfortunately, the subject is just too complicated to be
approached exclusively from math and geometry as applied to games.  Where
value judgments are necessarily required (for instance, in determining the
details of a formula and what 'looks right' based only upon estimated
material values of pieces in well-established games that seem to work
well), philosophy becomes involved.  Thereafter, the dangerous line
between 'the unreasonable effectiveness of mathematics' and 'the
unreasonable ineffectiveness of philosophy' (to quote Dr. Steven
Weinberg) is approached.

For what it is worth, your set of material values for pieces in CRC fall
into the safe, flat scale between the relatively compressed scale of Trice
and the relatively expanded scale of Nalls.  So, if there is anything at
all reliable within the work of any of the 3 of us, then your calculations
for pieces in CRC are either the most accurate or the 2nd most accurate.

💡📝Reinhard Scharnagl wrote on Tue, Apr 4, 2006 03:55 PM EDT:
Hi Derek, your values now are also shown at my site at 
http://www.chessbox.de/Compu/schachveri1_e.html, around where you also
could find my reworked piece value derivation.

Derek Nalls wrote on Tue, Apr 4, 2006 02:21 AM EDT:
material values- all pieces
Capablanca Random Chess
http://www.symmetryperfect.com/shots/values-capa.pdf

💡📝Reinhard Scharnagl wrote on Sun, Jan 29, 2006 04:12 PM EST:
There now a german language description is available at wikipedia:
http://de.wikipedia.org/wiki/Capablanca-Random-Chess

💡📝Reinhard Scharnagl wrote on Wed, Oct 19, 2005 02:23 PM EDT:
Hi Greg, the only chess program I have inspected ever has been an early
version of GNU. I then immediately decided not to use anything from it. So
SMIRF is completely self developed. But some strategies as known and
documented in literature have influenced me. Actual today is SMIRF 1.28.

As far as I can see SMIRF has a very different data structure. It is a
flat interpreted 15x12 array. The pieces consist of bit encoded properties
and are members of two double linked always sorted lists. There are two
concurring pruning strategies: intelligence feed back (self invented) and
controlled single nullmove (less important). There is only ONE engine
playing a lot of 8x8 and 10x8 chess variants compatibly including
traditional chess rules, Fischer castlings and the extended Capablanca
piece set. One exceptional extension is Janus Chess with its symmetric
castling. The evaluation (still very weak) is not done at quiet nodes but
at deescalated nodes, which means, that also positional combinations are
terminated instead of only piece exchanges.

Greg Strong wrote on Wed, Oct 19, 2005 12:27 PM EDT:
Reinhard:

Thank you for the information, and for your continued work on SMIRF!  It 
is much easier for me to develop and test ChessV now that I have another
strong Universal Chess Program against which to test it.  I'll download
the new version you mention and check it out soon...

Also, you should be aware that the last two versions of ChessV (0.8 and
0.81) have a really bad bug which results in the program making really
stupid moves on rare occasions.  I've fixed this, but haven't gotten
around to uploading a correction.  In the next couple of days I will
upload a new version...

Out of curiousity, have you looked at the source code to ChessV?  And, if
so, has it veen of help to you?  Just curious.  I would also be curious to
know what technologies SMIRF uses (such as null move, forward pruning,
quiescent search, singular extensions, etc.)

Thanks!
Greg

💡📝Reinhard Scharnagl wrote on Thu, Oct 13, 2005 12:13 PM EDT:
Hello Greg Strong!

I see, that you have tried to test out a more recent SMIRF version. First
download the actual beta 1.26 from
http://www.chessbox.de/Compu/schachsmirf_e.html . If you want to install
it into an existing directory, make sure, that this would be empty (no INI
file might exist there). 

The current beta has a free testing key including October. To start a game
with white, simply enter a move. To make Smirf use the white pieces, simply
press the right button (with the flash symbol).

I just have played some Janus Chess games with it and ChessV, SMIRF has
become really strong. ;-)

Reinhard.

💡📝Reinhard Scharnagl wrote on Wed, Aug 31, 2005 10:18 PM EDT:
Hi Greg,

> I have been trying this version, but have some difficulties...
> I have been using Janus Chess for testing.

yes, from time to time there is a fully testable Smirf version, which is
only time limited by an attached testing key.

> First, no matter which timing mode I use, the program always seems
> to make its move in less than a second.

That is Smirf's behaviour when the testing key is wrong or timed out. The
current beta package has a working key valid until end of September. So I
prosume you are not testing the current package or have it repeatedly
installed into an already existing Smirf folder where an outtimed key has
been stored in its ini file (and would not be replaced). Thus repeat the
installing procedure but delete any existing Smirf INI file before.

In the reduced mode you are describing, Smirf abilities still could be
inspected, but thinking time and some abilities are reduced. This is
because Smirf is intended to become Shareware later.

> Second problem is that I do not see where you decide which side(s)
> are computer controlled.  After a manual move is entered, it starts
> thinking, but I see no way to make the computer play itself...

Well, Smirf does not play against itself. It is planned to install a 
special form of remote playing ability to enable playing with other 10x8 
chess programs. That would help to also test different engine versions 
to hopefully detect progresses.

There is a check box 'automatic'. Switch it off, and you could enter as
much moves as you like without Smirf's answering.

You also could switch into the edit mode and e.g. switch the active color.

> Otherwise, the program looks nice.  Keep up the good work!

Same for your ChessV! I hope for this there would be a remote protocol 
installed, too (and a beep). Ed Trice has proposed one, but it seems not
to be sufficiently flexible to also support other 10x8 Chess variants.
Thus I try to implement a compatible protocol superset. Do you have
matching ideas?

Regards, Reinhard.

Greg Strong wrote on Wed, Aug 31, 2005 09:17 PM EDT:
I have been trying this version, but have some difficulties...  I have been
using Janus Chess for testing.  

First, no matter which timing mode I use, the program always seems to make
its move in less than a second.

Second problem is that I do not see where you decide which side(s) are
computer controlled.  After a manual move is entered, it starts thinking,
but I see no way to make the computer play itself...

Otherwise, the program looks nice.  Keep up the good work!

💡📝Reinhard Scharnagl wrote on Mon, Aug 29, 2005 02:05 PM EDT:
a) CRC (Capablanca Random Chess) will be supported soon by
http://www.brainking.com .

b) There is a time limited Beta of SMIRF FullChess program (full
functional) playing a lot of variants including CRC, for download see
http://www.chessbox.de/Compu/schachsmirf_e.html .

Regards, Reinhard Scharnagl.

🕸Fergus Duniho wrote on Thu, Jun 30, 2005 09:52 PM EDT:Good ★★★★
This looks like a good game. I like Fischer Random Chess, as well as some of the variants played on this board with these pieces. So I expect the combination to be good.

💡📝Reinhard Scharnagl wrote on Tue, Apr 26, 2005 01:38 AM EDT:
Well, I am still no fan of Open Source here. Nevertheless I have published the details of the new TMCI protocol, thus making it freely usable. That is, because I am arguing for open standards and interface descriptions.

Greg Strong wrote on Mon, Apr 25, 2005 08:03 PM EDT:Excellent ★★★★★
The Beta of SMIRF is quite nice! Good user interface, nice set of features, and intelligent play. It would be nice if you would consider making it open-source.

💡📝Reinhard Scharnagl wrote on Thu, Apr 21, 2005 05:56 AM EDT:
A) Sorry for not having accomplished to update the CRC content here.

B) There is a first public beta of Smirf (about 1.3 MB), unrestricted
until 2005/06/30. Of course this chess program is subject to further
improvements: http://de.geocities.com/rsmuenchen/

The program should be handled intuitively. But also notice:

a) the board could be turned by clicking on a corner of the board, 
b) in edit mode castling rights easyly could be switched by clicking the
file letters near the involved rooks. This simplifies a consistent
management of castling rights especially with Chess960 positions (maybe an
idea for Arena), 
c) you will find possibilities to select how move possibilities should be
shown or not in the help menu, 
d) double clicking on a move of the list of possible moves will show that
move and preselect it, 
e) double clicking on a move of the game list will reposition the game to
the related situation.

💡📝Reinhard Scharnagl wrote on Fri, Mar 18, 2005 05:07 AM EST:
Are there any ideas how to accomplish changed contents to become exchanged here on this site?

🕸Fergus Duniho wrote on Wed, Mar 2, 2005 08:06 PM EST:
You might not be giving it the opportunity to change its seed for the random number generator. It will normally pick a fresh seed at the beginning of each new game, but you may sometimes have to refresh the page to make this happen. It has no facility for letting you choose the array you want. It always automatically generates a random array.

💡📝Reinhard Scharnagl wrote on Wed, Mar 2, 2005 12:23 PM EST:
To Fergus Duniho: No, the rules still are the same, the overall layout should have been improved. According to your CRC Game Courier Preset I am still not familiar how to randomize or to preset a special position number. It seems to always create the same array.

🕸Fergus Duniho wrote on Wed, Mar 2, 2005 11:58 AM EST:
Are there any changes to the rules that I need to change in the Game Courier preset?

💡📝Reinhard Scharnagl wrote on Wed, Mar 2, 2005 10:58 AM EST:
Today I have sent in an updated version of the CRC proposal. I hope that it
could replace the old initial version soon and that it then would be much
better to read.

I want to thank here Mr. Bodlaender and all others, who help together to
publish those new proposals within this 10-chess contest and for the big
efforts they are putting into this huge chessvariants project!

P.S.: Are there any ideas how to accomplish changed contents to become exchanged here on this site?

💡📝Reinhard Scharnagl wrote on Mon, Feb 28, 2005 12:56 PM EST:
To Larry L. Smith: It seems you are targeting, that CRC should not care at all on Gothic Chess. May be you could be right. But I do not intend to have any unnecessary quarrel about that theme, so I prefer to exclude some few (15 arrays) positions. I think the remaining 21821 starting arrays nevertheless should be sufficient for CRC.

Larry Smith wrote on Mon, Feb 28, 2005 12:42 PM EST:
Gothic Chess, being a derivative of Capablanca Chess, has no exclusive claim upon Capablanca Chess. Neither does it have a claim upon Fischer's Random Chess. Thus how does combining these two independent forms, which it has absolutely no claim upon, be actionable on the part of Gothic Chess?

💡📝Reinhard Scharnagl wrote on Mon, Feb 28, 2005 12:39 PM EST:
To Fergus Duniho: Well, if that is indeed the historic array of Bird, then
a Hamming distance of at least three (as I have specified) would be more
than sufficient. So I would not change that demanded difference of three.


I would like to keep the Hamming distance, because shifting a group of
pieces has an immense effect on the properties of a starting array. And I
think that the so created valid CRC arrays obviously are distinct from
GC.

🕸Fergus Duniho wrote on Mon, Feb 28, 2005 11:42 AM EST:
<BLOCKQUOTE> you are obviously unsure on the grade of distinctness between valid CRC arrays and the GC starting position. </BLOCKQUOTE> <BLOCKQUOTE> Comparing the GC array 'RNBQCKABNR' to one reported as from Bird 'RNBCQKABNR' there is a Hamming distance of only two. </BLOCKQUOTE> <P>That is correct. In this instance, the Levenshtein Distance is also 2.</P> <P>Based on this, I see three options for you.</P> <OL> <LI> Exclude just the Gothic Chess setup.</LI> <LI> Exclude any setup whose Hamming Distance from Gothic Chess is 2 or less.</LI> <LI> Exclude any setup whose Levenshtein Distance from Gothic Chess is 2 or less.</LI> </OL> <P>Each subsequent option excludes more setups than the previous one. Your CRC proposal currently uses the second of these options.</P>

💡📝Reinhard Scharnagl wrote on Mon, Feb 28, 2005 11:24 AM EST:
To Fergus Duniho: you are obviously unsure on the grade of distinctness
between valid CRC arrays and the GC starting position. So let us do a
historic approach and try to calculate the distance between GC and
historic 10x8 starting arrays as from Carrera, Bird or Capablanca. I think
that there are more than three reported arrays from those people. 

When it has been possible to patent GC being only slightly different to
those positions, it should be sufficient to demand only the smallest 
there occurring distance. Comparing the GC array 'RNBQCKABNR' to one
reported as from Bird 'RNBCQKABNR' there is a Hamming distance of only
two. But I am not sure, if this Bird's array has been specified that way
- I am missing still the original source. If the smallest distance indeed
should be greater than three, the code I have supplied has to be changed
appropriately.

May be variant experts could help to solve that question doubtlessly.

🕸Fergus Duniho wrote on Mon, Feb 28, 2005 10:55 AM EST:
<P>Reinhard Scharnagl wrote:</P> <BLOCKQUOTE> it seems as if you would use a very complex method to detect invalid starting positions. I will add a more simple method in short to the reference code I have posted here yesterday. Thus one will be able to see, that generating valid CRC positions only is neither a run time problem nor too complex to be programmed. </BLOCKQUOTE> <P>No, my method is not so complex, and once I fixed the infinite loop bug, there were no run time problems. I have since modified it to your exact specifications, but here is how the method you're commenting on worked.</P> <OL> <LI> Clear the first rank.</LI> <LI> Select a random setup per your instructions.</LI> <LI> Check whether each Pawn is defended, and if any is undefended, start over.</LI> <LI> Generate a string of the setup and calculate its Levenshtein Distance from the setup for Gothic Chess. If the Levenshtein Distance is too small, start over. </OL> <P>The Levenshtein Distance is the minimal number of operations it takes to change one string into another, counting insertions, deletions, and substitutions as operations. Your instructions use the Hamming Distance, which is the number of substitutions it takes to change one string into another string of the same length. Although calculation of the Levenshtein Distance is more complicated than calculation of the Hamming Distance, I don't have to worry about that, because it is handled by a PHP function. Since almost all setups will pass, using the Levenshtein Distance doesn't cause any appreciable increase in time.</P> <P>Using the Hamming Distance, as your instructions use, has the advantage of being easier for humans to calculate, but as long as computers do the calculations, the more sophisticated Levenshtein Distance might be preferable. Whenever they are unequal, the Levenshtein Distance will be smaller than the Hamming Distance. This would be useful if you want to avoid setups that differ from Gothic Chess not only by a couple substitutions but also by moving one piece in a way that shifts much of the lineup one space left or right but keeps most of the order intact. For example, 'BRNBQCKANR' has all Pawns defended, and its Hamming Distance from Gothic Chess is 8, but its Levenshtein Distance is 2, because I got it by simply deleting a Bishop and inserting it on the left side.</P> <P>Your reference code has answered one question I had. I wasn't sure whether you meant to exclude setups whose Hamming Distance from Gothic Chess was less than three or less than or equal to three. From your code, it looks like less than three. So you're excluding any setup with a Hamming Distance of two or less. Given the same pieces, you will never have a Hamming Distance of only 1. So what you are excluding is limited to only setups that differ by switching the places of two pieces.</P> <P>The preset I made currently uses the Hamming Distance and follows your instructions to the letter for generating a random position and excluding invalid setups. If you ever decide that you would rather use the Levenshtein Distance, all I will have to do is replace the hamming operator with the levenshtein operator in my code.</P>

💡📝Reinhard Scharnagl wrote on Mon, Feb 28, 2005 08:47 AM EST:
<pcode> Results of the CRC reference code:<br> <br> first Chess960 positions<br> (001) bqnbnrkr/pppppppp/8/8/8/8/PPPPPPPP/BQNBNRKR w KQkq - 0 1<br> (002) bqnnrbkr/pppppppp/8/8/8/8/PPPPPPPP/BQNNRBKR w KQkq - 0 1<br> (003) bqnnrkrb/pppppppp/8/8/8/8/PPPPPPPP/BQNNRKRB w KQkq - 0 1<br> (004) qbbnnrkr/pppppppp/8/8/8/8/PPPPPPPP/QBBNNRKR w KQkq - 0 1<br> (005) qnbbnrkr/pppppppp/8/8/8/8/PPPPPPPP/QNBBNRKR w KQkq - 0 1<br> (006) qnbnrbkr/pppppppp/8/8/8/8/PPPPPPPP/QNBNRBKR w KQkq - 0 1<br> (007) qnbnrkrb/pppppppp/8/8/8/8/PPPPPPPP/QNBNRKRB w KQkq - 0 1<br> (008) qbnnbrkr/pppppppp/8/8/8/8/PPPPPPPP/QBNNBRKR w KQkq - 0 1<br> (009) qnnbbrkr/pppppppp/8/8/8/8/PPPPPPPP/QNNBBRKR w KQkq - 0 1<br> (010) qnnrbbkr/pppppppp/8/8/8/8/PPPPPPPP/QNNRBBKR w KQkq - 0 1<br> <br> first CRC positions<br> (00001 --) aqbbcnnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/AQBBCNNRKR w KQkq - 0 1<br> (00002 ok) qbbacnnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/QBBACNNRKR w KQkq - 0 1<br> (00003 --) abbqcnnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/ABBQCNNRKR w KQkq - 0 1<br> (00004 ok) qbbcnanrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/QBBCNANRKR w KQkq - 0 1<br> (00005 ok) abbcnqnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/ABBCNQNRKR w KQkq - 0 1<br> (00006 --) qbbcnnrakr/pppppppppp/10/10/10/10/PPPPPPPPPP/QBBCNNRAKR w KQkq - 0 1<br> (00007 --) abbcnnrqkr/pppppppppp/10/10/10/10/PPPPPPPPPP/ABBCNNRQKR w KQkq - 0 1<br> (00008 --) qbbcnnrkra/pppppppppp/10/10/10/10/PPPPPPPPPP/QBBCNNRKRA w KQkq - 0 1<br> (00009 --) abbcnnrkrq/pppppppppp/10/10/10/10/PPPPPPPPPP/ABBCNNRKRQ w KQkq - 0 1<br> (00010 --) baqbcnnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BAQBCNNRKR w KQkq - 0 1<br> (00011 --) bqabcnnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BQABCNNRKR w KQkq - 0 1<br> (00012 ok) bbqacnnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBQACNNRKR w KQkq - 0 1<br> (00013 --) bbaqcnnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBAQCNNRKR w KQkq - 0 1<br> (00014 ok) bbqcnanrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBQCNANRKR w KQkq - 0 1<br> (00015 ok) bbacnqnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBACNQNRKR w KQkq - 0 1<br> (00016 --) bbqcnnrakr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBQCNNRAKR w KQkq - 0 1<br> (00017 ok) bbacnnrqkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBACNNRQKR w KQkq - 0 1<br> (00018 --) bbqcnnrkra/pppppppppp/10/10/10/10/PPPPPPPPPP/BBQCNNRKRA w KQkq - 0 1<br> (00019 ok) bbacnnrkrq/pppppppppp/10/10/10/10/PPPPPPPPPP/BBACNNRKRQ w KQkq - 0 1<br> (00020 --) bacbqnnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BACBQNNRKR w KQkq - 0 1<br> (00021 ok) bqcbannrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BQCBANNRKR w KQkq - 0 1<br> (00022 --) bbcaqnnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBCAQNNRKR w KQkq - 0 1<br> (00023 ok) bbcqannrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBCQANNRKR w KQkq - 0 1<br> (00024 ok) bbcnqanrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBCNQANRKR w KQkq - 0 1<br> (00025 ok) bbcnaqnrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBCNAQNRKR w KQkq - 0 1<br> (00026 ok) bbcnqnrakr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBCNQNRAKR w KQkq - 0 1<br> (00027 ok) bbcnanrqkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBCNANRQKR w KQkq - 0 1<br> (00028 --) bbcnqnrkra/pppppppppp/10/10/10/10/PPPPPPPPPP/BBCNQNRKRA w KQkq - 0 1<br> (00029 ok) bbcnanrkrq/pppppppppp/10/10/10/10/PPPPPPPPPP/BBCNANRKRQ w KQkq - 0 1<br> (00030 ok) bacbnnqrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BACBNNQRKR w KQkq - 0 1<br> (00031 ok) bqcbnnarkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BQCBNNARKR w KQkq - 0 1<br> (00032 ok) bbcannqrkr/pppppppppp/10/10/10/10/PPPPPPPPPP/BBCANNQRKR w KQkq - 0 1<br> <br> 21821 valid CRC arrays<br> </pcode>

💡📝Reinhard Scharnagl wrote on Mon, Feb 28, 2005 04:18 AM EST:
//========================================
// Valid CRC / Chess960 Position generator
//========================================
// Reference Implementation, (C) 2005 by
// Reinhard Scharnagl, Munich, Germany
//----------------------------------------
// Correction 2005-Feb-28 (GC-Nearness)
//========================================

#include < string.h>
#include < stdio.h>

#define TXT_LIM 160

static char FenZone[TXT_LIM];

// insert a symbol into FEN-String 
// -------------------------------
// color could be:
// col <  0 => not specified
// col == 0 => bright square
// col == 1 => dark square
void PlaceIntoFEN
  (int cntFree, char symbol, int fieldColor)
{
  for (int pos = 0, free = 0; ; ++pos) {
    if (fieldColor < 0 || ((fieldColor ^ pos) & 1)) {
      if (!FenZone[pos] && cntFree == free++) {
        FenZone[pos] = symbol;
        break;
      }
    }
  }
}

// generating of FEN strings
// -------------------------
// nr could be
// nr >= 0 creating Chess960 position (1 ... 960)
// nr <  0 creating CRC position    (1 ... 48000)
const char *GetFen(int nr)
{
  // knight distributions over 5 free squares
  static const int knight_pos[10] = {
     3, // xx--- (binary encoded)
     5, // x-x--
     9, // x--x-
    17, // x---x
     6, // -xx--
    10, // -x-x-
    18, // -x--x
    12, // --xx-
    20, // --x-x
    24  // ---xx
  };

  // clear the working area
  int bit, pos = TXT_LIM;
  while (--pos >= 0) { FenZone[pos] = '\0'; }

  // test whether CRC is requested
  bool isCRC = (nr <= 0);

  if (isCRC) {
    nr = -nr;
    bool q_first = ((nr % 2) != 0);
    nr /= 2;
    PlaceIntoFEN(nr % 5, q_first ? 'q' : 'a', 0);
    nr /= 5;
    PlaceIntoFEN(nr % 5, q_first ? 'a' : 'q', 1);
    nr /= 5;
  }

  PlaceIntoFEN(nr % 4, 'b', 0);
  nr /= 4;
  PlaceIntoFEN(nr % 4, 'b', 1);
  nr /= 4;
  PlaceIntoFEN(nr % 6, isCRC ? 'c' : 'q', -1);
  nr /= 6;
  pos = knight_pos[nr % 10];
  for (bit = 5; --bit >= 0; ) {
    if ((pos & (1 << bit)) != 0)
      PlaceIntoFEN(bit, 'n', -1);
  }

  PlaceIntoFEN(2, 'r', -1);
  PlaceIntoFEN(1, 'k', -1);
  PlaceIntoFEN(0, 'r', -1);

  int width = isCRC ? 10 : 8;
  char *pC = &FenZone[width];
  *pC++ = '/';
  for (pos = width; --pos >= 0; ) {
    *pC++ = 'p';
  }
  for (pos = 4; --pos >= 0; ) {
    *pC++ = '/';
    if (width >= 10) {
      *pC++ = '1';
    }
    *pC++ = (char)('0' + width % 10);
  }
  *pC++ = '/';
  for (pos = width; --pos >= 0; ) {
    *pC++ = 'P'; 
  }
  *pC++ = '/';
  for (pos = 0; pos < width; ++pos) {
    *pC++ = FenZone[pos] ^ ('a'^'A');
  }
  strcpy(pC, ' w KQkq - 0 1');

  return FenZone;
}

// check if FEN is valid for CRC
// -----------------------------
bool IsValidCRC(const char *pFen) 
{
  // to be avoided GC position
  static const char *gcArray = 'rnbqckabnr';
  // pawn covering pieces (like a rook)
  static const char *covNear = 'rcqk';
  // pawn covering pieces (like a bishop)
  static const char *covDiag = 'baqk';
  // pawn covering pieces (like a knight)
  static const char *covDist = 'nac';

  int size = (int)(strchr(pFen, '/') - pFen);
  int diff = 0;
  for (int n = size; --n >= 0; ) {
    // different to GC?
    if (pFen[n] != gcArray[n]) {
      ++diff;
    }
    // unprotected pawns?
    if (strchr(covNear, pFen[n]))
      continue;
    if ((n+1) < size && strchr(covDiag, pFen[n+1]))
      continue;
    if ((n-1) >=   0 && strchr(covDiag, pFen[n-1]))
      continue;
    if ((n+2) < size && strchr(covDist, pFen[n+2]))
      continue;
    if ((n-2) >=   0 && strchr(covDist, pFen[n-2]))
      continue;
    return false;
  }
  // GC-near position?
  if (diff < 3 && size == (int)strlen(gcArray)) {
    return false;
  }

  return true;
}

// test output
// -----------
int main(void)
{
  puts('\nfirst Chess960 positions');
  for (int nrFRC = 0; ++nrFRC <= 10; ) {
    printf('(%03d) %s\n',
      nrFRC, GetFen(nrFRC));
  }

  puts('\nfirst CRC positions');
  int cntValid = 0;
  for (int nrCRC = 0; ++nrCRC <= 48000; ) {
    const char *pFEN = GetFen(-nrCRC);
    bool valid = IsValidCRC(pFEN); 
    if (nrCRC <= 32) {
      printf('(%05d %s) %s\n',
        nrCRC, valid ? 'ok' : '--', pFEN);
    }
    if (valid) {
      ++cntValid;
    }
  }

  printf('\n%d valid CRC arrays\n', cntValid);

  return 0;
}

💡📝Reinhard Scharnagl wrote on Mon, Feb 28, 2005 03:38 AM EST:
To Mark Thompson: three always is a good number. We have so much possible
positions in CRC, so it does not hurt to skip some to avoid any conflicts
with Gothic Chess. Live and let live.

To Fergus Duniho: it seems as if you would use a very complex method to
detect invalid starting positions. I will add a more simple method in
short to the reference code I have posted here yesterday. Thus one will be
able to see, that generating valid CRC positions only is neither a run time
problem nor too complex to be programmed.

Mark Thompson wrote on Sun, Feb 27, 2005 09:11 PM EST:
Just curious, why 3 or fewer? Rather than zero?

🕸Fergus Duniho wrote on Sun, Feb 27, 2005 08:36 PM EST:
It looks like I won't need a list. It was timing out on me before because a bug was causing an infinite loop. It was checking for 'not ATTACKEDBYW' instead of 'not fn ATTACKEDBYW', which means it was applying 'not' to the function name instead of to the function itself. This gave the same result every time, leading to an infinite loop. As soon as I fixed the bug, it worked, and it gave me a position with all Pawns defended. But I think I will still optimize this by created a special DEFENDED function that more quickly checks whether a Pawn has a defender. As for comparing the setup to the Gothic Chess setup, I was thinking of calculating the Levenshtein Distance (which is the minimal number of characters you have to replace, insert or delete to transform one string into another) and rejecting any with a distance of 3 or closer. This would be making use of PHP's levenshtein function, which I have passed along to GAME Code. Or should I simply count the number of positions that are the same?

🕸Fergus Duniho wrote on Sun, Feb 27, 2005 08:18 PM EST:
Reinhard, if you could provide me with a list of all valid CRC positions, I could store it as an array and use it for randomly selecting a position. You can email it to me at the address found by clicking on my name.

💡📝Reinhard Scharnagl wrote on Sun, Feb 27, 2005 06:57 PM EST:
//=====================================
// CRC / Chess960 Position Generator
//=====================================
// reference implementation (C) 2005 by
// Reinhard Scharnagl, Munich, Germany
//=====================================

#include < string.h>
#include < stdio.h>

#define TXT_LIM 160

static char FenZone[TXT_LIM];

// insert a symbol into FEN-String 
// -------------------------------
// color could be:
// col <  0 => not specified
// col == 0 => bright square
// col == 1 => dark square
void PlaceIntoFEN
  (int cntFree, char symbol, int fieldColor)
{
  for (int pos = 0, free = 0; ; ++pos) {
    if (fieldColor < 0 || ((fieldColor ^ pos) & 1)) {
      if (!FenZone[pos] && cntFree == free++) {
        FenZone[pos] = symbol;
        break;
      }
    }
  }
}

// generating of FEN strings
// -------------------------
// nr could be
// nr >= 0 creating Chess960 position (1 ... 960)
// nr <  0 creating CRC position    (1 ... 48000)
const char *GetFen(int nr)
{
  // knight distributions over 5 free squares
  static const int knight_pos[10] = {
     3, // xx--- (binary encoded)
     5, // x-x--
     9, // x--x-
    17, // x---x
     6, // -xx--
    10, // -x-x-
    18, // -x--x
    12, // --xx-
    20, // --x-x
    24  // ---xx
  };

  // clear the working area
  int bit, pos = TXT_LIM;
  while (--pos >= 0) { FenZone[pos] = '\0'; }

  // test whether CRC is requested
  bool istCRC = (nr <= 0);

  if (istCRC) {
    nr = -nr;
    bool q_first = ((nr % 2) != 0);
    nr /= 2;
    PlaceIntoFEN(nr % 5, q_first ? 'q' : 'a', 0);
    nr /= 5;
    PlaceIntoFEN(nr % 5, q_first ? 'a' : 'q', 1);
    nr /= 5;
  }

  PlaceIntoFEN(nr % 4, 'b', 0);
  nr /= 4;
  PlaceIntoFEN(nr % 4, 'b', 1);
  nr /= 4;
  PlaceIntoFEN(nr % 6, istCRC ? 'c' : 'q', -1);
  nr /= 6;
  pos = knight_pos[nr % 10];
  for (bit = 5; --bit >= 0; ) {
    if ((pos & (1 << bit)) != 0)
      PlaceIntoFEN(bit, 'n', -1);
  }

  PlaceIntoFEN(2, 'r', -1);
  PlaceIntoFEN(1, 'k', -1);
  PlaceIntoFEN(0, 'r', -1);

  int width = istCRC ? 10 : 8;
  char *pC = &FenZone[width];
  *pC++ = '/';
  for (pos = width; --pos >= 0; ) {
    *pC++ = 'p';
  }
  for (pos = 4; --pos >= 0; ) {
    *pC++ = '/';
    *pC++ = (char)('0' + width % 10);
  }
  *pC++ = '/';
  for (pos = width; --pos >= 0; ) {
    *pC++ = 'P'; 
  }
  *pC++ = '/';
  for (pos = 0; pos < width; ++pos) {
    *pC++ = FenZone[pos] ^ ('a'^'A');
  }
  strcpy(pC, ' w KQkq - 0 1');

  return FenZone;
}

// test output
int main(void) {
  puts('first Chess960 positions');
  for (int nrFRC = 0; ++nrFRC <= 5; ) {
    puts(GetFen(nrFRC));
  }

  puts('first CRC positions');
  for (int nrCRC = 0; ++nrCRC <= 5; ) {
    puts(GetFen(-nrCRC));
  }

  return 0;
}

💡📝Reinhard Scharnagl wrote on Sun, Feb 27, 2005 06:07 PM EST:
To Greg Strong and Fergus Duniho: I have not awaited, that CRC would cause that quick your experiments to create those starting positions. Because of that I have not yet published a procedure, which would show how Smirf managed that problem and how to standardize the number to position relation. It obviously is not well known, that it has been me, who invented and introduced the numbering schema for Chess960. Beside of that numeric relation I have worked out a two table look up scheme which is fitting on to one single page to be used in chess clubs to have all Chess960 starting positions immediately at hands. For CRC a solution is of course not that easy. But if you are interested in that, I could post code snippets, where those positions are created from a given number. When Smirf is starting, it quickly creates an array of valid position numbers by probing all 48,000 and filtering the valid into an array of some more than 20,000 entries, what overmore allows to index those array with a short int, which is good for some pseudo random number generators, selecting later a randomized valid starting position. Another solution could be to use 6000 char constants, where the mass of 48,000 bits could be used to encode the precalculated validity of the appropriate number.

💡📝Reinhard Scharnagl wrote on Sun, Feb 27, 2005 05:50 PM EST:
To Larry L. Smith: Well I know, that e.g. Shogi starts with three undefended pawns. Nevertheless the game has survived for long. But proposing new chess variants is mostly running against immense critic. So there are voices, which claims that most of the randomized positions were unplayable. I do not believe that at all, but I think it could help, to select just those positions, which are positionally more balanced. That lead to write down the additional rule of initially placing the Archbishop and Queen on different colored squares and to select only positions with all pawns defended. Of course this will reduce the genuine 48,000 possibilities to some more than 20,000. But this is still enough to avoid any creation of big opening libraries. So applying the rule might be skipped, but using it would help to make the variant more attractive to critic chess enthusiasts. Thus it has become part of my proposal.

Larry Smith wrote on Sun, Feb 27, 2005 03:37 PM EST:
Why does each Pawn need to be defended at the initial set-up?

This seems to be an arbitrary rule.  There are many good Chess games where
each and every Pawn is not defended at the start.

In fact, these un-defended Pawns can create a nice area of early
contention in play.

Is there an actual 'flawed' setup, resulting in the loss of the game for
one or the other player?

Greg Strong wrote on Sun, Feb 27, 2005 03:23 PM EST:
Fischer Random Chess has the 960 legal starting positions numbered, and has
the details on how to find a position from it's number, and how to find
the number based on the position.  Capablanca Random Chess could benefit
from such a system.  Besides making it easier to identify starting
positions, it would also solve Fergus' present dilema.  If a position can
be determined from a position number, all that would be required is
generation a random number in the valid range.

For a good description of how FRC identifies positions by number, see:
http://frcec.tripod.com/fischerrandomchessstartingpositions/

🕸Fergus Duniho wrote on Sun, Feb 27, 2005 03:12 PM EST:
I'm working on a Game Courier preset for this game, but I've hit a snag. So far, I have code that creates a random position, and I have code for checking whether all Pawns are protected, and I can also check the Levenshtein distance between a given setup and Gothic Chess. The problem is that PHP, which Game Courier is written in, gives it only 30 seconds to find a valid setup, and in each test, it has run out of time before finding one. So what I need is some shortcut for either selecting valid setups or screening out invalid ones. What might be ideal is to have a database of valid setups, each keyed to a single number, and then Game Courier could just pick a single random number, fetch the corresponding setup, and skip the tedious iterative process of randomly placing pieces until a valid setup is found. Another possibility would be to filter out a number of bad setups with wildcard filters, which would be faster than checking whether each Pawn is defended, but it would require appropriate filters. Does anyone have anything I could use without having to do all the preparation work myself?

Larry Smith wrote on Sat, Feb 26, 2005 08:09 PM EST:
Reinhard, I've worked up an example with two crossed spears and a pair of
wings flanking a halo.  You should be able to view it below:

http://users3.ev1.net/~llsmith/home/angel_w.gif

💡📝Reinhard Scharnagl wrote on Sat, Feb 26, 2005 01:22 PM EST:
To Larry Smith: I have asked some interested people to send me some icon proposals. They should be not too complicated, differ sufficiently from existing and be related to the pieces' gaits. But I have not got some really convincing. Nevertheless if one has an exiting idea ...

Larry Smith wrote on Sat, Feb 26, 2005 12:00 PM EST:
Just a small aesthetic observation about the graphic for the Archangel. 
Swords being short-range weapons, angels are also known to carry spears
which have longer range.

To carry over the motif from the Centaur, it could be a horseshoe with two
crossed spears.

Or the angelic theme might be further emphasized with a pair of wings and
two crossed spears.

David Paulowich wrote on Sat, Feb 26, 2005 08:23 AM EST:
Sometimes I wish Christian Freeling had used 'Marshalls' and 'Capablancas' in Grand Chess. Naming the pieces after two grandmasters would save us from endlessly debating the spelling of Marshal(l).

Charles Gilman wrote on Sat, Feb 26, 2005 02:48 AM EST:Good ★★★★
Good to see someone taking up the suggestion inspired by Grotesque Chess. I'm not keen on the names here either, my favourites being Marshal and Cardinal, but I'm getting used to such 'agreements to differ'.

💡📝Reinhard Scharnagl wrote on Thu, Feb 24, 2005 09:50 PM EST:
To Greg Strong: of course you are right with your historical hints. There
might be some remarks to be added in the CRC description. The CRC text
should be extended, if there would be enough interested readers.

To Greg Strong and David Paulowich: indeed there are more traditional
names for C (Chancellor) and A (Archbishop). But those names do not
correspond to the pieces: nor to their gaits nor to their symbols. I have
tried to design more intuitive gait related symbols and noticed, that the
names would not be helpful for newcomers to the Capablanca extended piece
set. So I proposed names (partially already used differently in other
context) to enhance the readability of CRC board positions to interested
people. But that approach is only a suggestion, carefully keeping the same
initial letters e.g. to stay compatible within X-FEN.

To all posters here at CRC until now: thank you for your interest and
encouraging words!

Robert Fischer wrote on Thu, Feb 24, 2005 01:37 PM EST:Excellent ★★★★★
Nice to see you moving forward with your dream.
Best regards!

David Paulowich wrote on Thu, Feb 24, 2005 01:34 PM EST:
'The champion has the combined moves of rook and knight. The centaur has the combined moves of bishop and knight.' - D. Pietro Carrera, 1617 <p>So the earliest variant gives the name Centaur to the other piece! Also, many people here follow Adrian King in calling the man-horse piece (K+N) a Centaur.

Greg Strong wrote on Thu, Feb 24, 2005 11:49 AM EST:Excellent ★★★★★

Very nice! The author has done an excellent job of defining a Fischer randomization system for Capablanca's Chess (actually this piece mix goes back to the 1600s with D. Pietro Carrera -- see Carrera's Chess.) It is obvious to me that the design has been carefully considered from both a game-designer's perspective and a software developer's perspective.

I'm not sure I like the idea of renaming the pieces, though. There are already too many different names for these pieces, and I think the goal should be to standardize the names, and I believe Capablanca's names of Archbishop and Chancellor are probably the best choices.


76 comments displayed

Later Reverse Order Earlier

Permalink to the exact comments currently displayed.