Check out Grant Acedrex, our featured variant for April, 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 by FergusDuniho

LatestLater Reverse Order EarlierEarliest
Recognized Chess Variants. Index page listing the variants we feel are most significant. (Recognized!)[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Mon, Mar 30, 2020 07:22 PM UTC:

Musketeer Chess is very young, and nothing has been added to this list since 2006. It has been replaced by the more democratic practice of letting users favorite games. You may play Musketeer Chess on this site with Game Courier.


Minishogi. A Minishogi association has existed, and may still exist, in Osaka.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Mon, Mar 30, 2020 05:43 PM UTC:

There was a problem with the form on this page. The form action had a query string in it, and the value for settings in the query string did not match the value in the input field. I deleted the query string, and I changed the value for settings in the input field to "default".


Possible issue on Shogi Drop[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Mon, Mar 30, 2020 05:24 PM UTC:

I had added the ability to enter moves backwards, but I hadn't taken into consideration that it also had to work with drops. I have now fixed that.


Minishogi. A Minishogi association has existed, and may still exist, in Osaka.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Mon, Mar 30, 2020 12:01 AM UTC:

I just clicked on the minishogi button, and it does go to a settings file that enforces the rules. Although the name of the settings file may be the only difference you see on the page, that one difference can make a major difference, because it points to an external file that contains the rule enforcing code.


The Fairychess Include File Tutorial. How to use the fairychess include file to program games for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sun, Mar 29, 2020 09:37 PM UTC:

Subroutines should be reserved for moves that generate side effects. For the King, side effects may include unsetting a flag or updating the current position of the King. Bear in mind that you need to provide a function for every piece. Use a subroutine only if actual moves require some capability that goes beyond what your function can already do. If you don't want to use the King subroutine, you could use King as an alias to another piece name that doesn't have a subroutine written for it. For example:

def Apothecary_King blah blah blah;

def Apothecary_King-Range blah blah blah;

alias King Apothecary_King;

set k King;

set K King;

But if you don't use the King subroutine, make sure you unset flags and update the values of kpos and Kpos in the external code whenever the King moves.


🕸📝Fergus Duniho wrote on Sun, Mar 29, 2020 09:27 PM UTC:

After creating this page, I moved some earlier comments on the fairychess include file to this page.


🕸📝Fergus Duniho wrote on Sun, Mar 29, 2020 01:15 AM UTC:

If you tell me what the image was, I can purge it from the cache sooner.


🕸📝Fergus Duniho wrote on Sun, Mar 29, 2020 01:12 AM UTC:

Although they don't need it, I just added the same code to Chess and Grand Chess, so that it's there if someone copies the code from one of these.


🕸📝Fergus Duniho wrote on Sat, Mar 28, 2020 11:09 PM UTC:

I just made some modifications to Gross Chess and the fairychess include file to use aliases for alternate piece names. Instead of the code I just showed you before, you can use this code:

alias Archbishop Cardinal;
setconst A Archbishop;
setconst a Archbishop;

But you will also have to copy some code from the Post-Move sections. The main change is that I added realname in front of const in expressions where I needed the function or subroutine name. Where I want to use the alias for display purposes, I did not use realname.


🕸📝Fergus Duniho wrote on Sat, Mar 28, 2020 10:12 PM UTC:

Looking at your code, you used the names of Cardinal, Marshall, and Half_Duck instead of Archbishop, Chancellor, and Lion. To use other names, you need to copy the relevant functions and variables to new names. For an example, I used this code to change the Cardinal to an Archbishop in Gross Chess:


copyfn Cardinal Archbishop;
copyfn Cardinal-Range Archbishop-Range;
set Archbishop-Desc var Cardinal-Desc;
setconst A Archbishop;
setconst a Archbishop;

Gross Chess. Play this 144 square variant online with Game Courier.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Sat, Mar 28, 2020 05:35 PM UTC:

The presets on this page now use the fairychess settings file, which uses the fairychess include file.


🕸💡📝Fergus Duniho wrote on Sat, Mar 28, 2020 04:44 PM UTC:

Thanks, I've corrected that.


The Fairychess Include File Tutorial. How to use the fairychess include file to program games for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sat, Mar 28, 2020 04:44 PM UTC:

Okay, I've fixed the White and Black Charging Knights.


Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sat, Mar 28, 2020 02:02 AM UTC:

I removed thespaces, since I couldn't find any use of it. Unlike spaces, which returned the keys to the $space array, it returned the $space array itself. In place of it, I made $space a readable and writable system variable.

I removed the answered operator and made $answered a readable and writable system variable. This variable gets set by ask and askpromote when they are answered. It is useful for writing code that stops asking the same question again and again after it has already been answered. I am going to update the White_Pawn and Black_Pawn functions to use it, so that I don't have to resort to the kludge of inserting "P-dest" or "p-dest" when a Pawn doesn't promote.

I just documented the baseurl operator. It returns the baseurl of the the Game Courier script.

I added and just documented the capturedpieces operator. This calculates and returns an associative array of the currently captured pieces. This replaces the use of $capturedpieces as a readable system variable with the system operator. It may still be overwritten with setsystem though, and it may also be accessed as a variable with a dollar sign before it. But this will return a value only if it has already been set, since Game Courier does not set the $capturedpieces variable until it has run through all the moves in a game.

 


Gross Chess. Play this 144 square variant online with Game Courier.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Fri, Mar 27, 2020 07:31 PM UTC:

It took me less time to do a new settings file for Gross Chess than it did for Grand Chess, because it builds on the work I already did for that game. The new one is now ready for beta-testing.

https://www.chessvariants.com/play/pbm/play.php?game=Gross+Chess&settings=fairychess


Question on PHP Engine or change on legal moves[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Fri, Mar 27, 2020 03:34 PM UTC:

Okay, that's now fixed. Thanks for reminding me how it was supposed to work.


Grand Chess. Decimal variant with Cardinals and Marshalls.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Fri, Mar 27, 2020 12:58 AM UTC:

Okay, I copied the test version of the fairychess include file to the official fairychess include file, and I updated this page to use the new fairychess settings file. I also removed debugging code from it and modified the descriptions of the Pawn and King to reflect the rules of Grand Chess.


Question on PHP Engine or change on legal moves[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Thu, Mar 26, 2020 08:06 PM UTC:

Thanks for mentioning that. I had forgotten about this ability, and I inadvertently introduced a bug that got rid of it. I have now restored it.


Grand Chess. Decimal variant with Cardinals and Marshalls.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Thu, Mar 26, 2020 07:04 PM UTC:

The new Grand Chess preset I've been working on is ready for some beta-testing. It is currently using a test version of the fairychess include file. If it looks like it's ready, I'll copy the test version to the official fairychess include file and officially release the new preset.

https://www.chessvariants.com/play/pbm/play.php?game=Grand+Chess&settings=fairychess


Gross Chess. A big variant with a small learning curve. (12x12, Cells: 144) [All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Wed, Mar 25, 2020 04:59 PM UTC:

I'll bear that in mind while working on a new preset for Grand Chess. With that as a foundation, I can start on a new and improved preset for Gross Chess.


Apothecary Chess-Classic. Large board variant obtained through tinkering with known games.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Wed, Mar 25, 2020 02:21 PM UTC:

One thing I just thought of is that the regular stalemated subroutine will not work for a game with the Joker. To factor in how moving a particular piece change's the checking power of the Joker, it should regulary update the value of lastpiece.

While looking up the correct name of the variable, I saw that I had used the wrong variable name in some places last night. When I corrected that, I was able to move the Joker in my fork of the Apothecary Chess 1 preset.

There are still more things to be done, but not right away.


🕸Fergus Duniho wrote on Wed, Mar 25, 2020 01:10 PM UTC:

Because then it is no longer that players turn, and a Joker is not allowed to move in the opponent's turn.

That's true of every piece on the board.

So during the opponent's turn it has no powers at all.

But that's not true of other pieces. Other pieces retain checking power during the opponent's move.

I would imagine that the Joker retains whatever power it used to move until the opponent moves another piece, thereby giving it a different power of movement. For example, if the Joker moves as a Rook and checks the King, the King would be in check, and one way to remove that check would be to move a Bishop, which would change the Joker's powers of movement.


🕸Fergus Duniho wrote on Wed, Mar 25, 2020 12:40 PM UTC:

The rule is that the joker moves like the last move of the opponent.

As stated, that's too ambiguous. Here are some possible interpretations:

1. The Joker has the same powers of movement as the last piece the opponent moved, which is what I've been trying to program with my Joker function.

2. The Joker mostly has the same powers of movement as the last piece the opponent moved, but there are exceptions for particular pieces. For example, it might not be able to promote or castle.

3. The Joker is limited to the type of move of the opponent's last move. For example, if the opponent moved a Queen, diagonally, the Joker would be able to move diagonally, but not orthogonally.

4. The Joker is limited to the type and direction of the opponent's last move. For example, if the Queen moved vertically forward, the Joker could move vertically forward, but it could not move vertically backward, horizontally, or diagonally.

5. The Joker is limited to the type, direction, and distance of the opponent's last move. For example, if the Queen moved vertically forward 4 spaces, the Joker could move vertically forward up to four spaces.

6. The Joker is limited to the type, direction, and precise distance of the opponent's last move. For example, if the Queen moved vertically forward 4 spaces, the Joker could move vertically forward 4 spaces, no more and no less.


🕸Fergus Duniho wrote on Wed, Mar 25, 2020 02:29 AM UTC:

In my fork of the Apothecary Chess 1 preset, the problem I've currently come up against may be due to endless recursion. When I try moving the Joker, the script crashes. What I think is happening is that after the Joker moves, it runs code for the other Joker, and now that the value of lastpiece is j or J, the Joker function recursively calls itself again and again without ever exiting. I just tried one way of fixing this, but it didn't solve the problem. Since it's late, I will not continue with any more attempts tonight. I just wanted to share what I think the problem is.


🕸Fergus Duniho wrote on Tue, Mar 24, 2020 08:15 PM UTC:

The problem was caused by using #lastpiece instead of var lastpiece. The former inserts the value into the line during preprocessing, which doesn't work out so well for null or empty values, while the latter looks it up while evaluating the expression. These will work instead.

def Joker fn const alias var lastpiece #0 #1;
def Joker-Range fn join const alias var lastpiece "-Range" #0;

One thing that has come up while examining your code is how you want the Joker to move after a piece that moves differently for each side, such as the Pawn. Should it move as the enemy Pawn, which is how it currently works, or as its own Pawn? For the latter, these should work:

def Joker fn const alias flipcase var lastpiece #0 #1;
def Joker-Range fn join const alias flipcase var lastpiece "-Range" #0;

While these changes eliminate the problem you were having, there is still a problem with actually moving the Joker piece. One problem is that the Joker doesn't properly handle pieces that use subroutines instead of functions. But even with pieces that just use functions, it is not working properly. I'm getting too tired to continue looking into this today. Maybe I'll make more progress tomorrow.


25 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.