Check out Atomic Chess, our featured variant for November, 2024.


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

Comments/Ratings for a Single Item

Earlier Reverse Order Later
Chess. The most popular of Chess variants, Chess itself. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Mon, Dec 5, 2022 01:52 AM UTC:

This is a freshly written Chess page using the membersubmissions forms. It may or may not eventually replace the other Chess page. I may add more details as time goes on, such as a section on notation.


🕸📝Fergus Duniho wrote on Sat, Feb 25, 2023 10:05 PM UTC:

Here is a game I ran between the Interactive Diagram on this page at 2.5 ply and Zillions-of-Games at 1 sec/move. Assuming that the Interactive Diagram would be weaker, I let it move first. My prediction proved correct, and Zillions-of-Games won.

  1. d4 Nc6
  2. c4 d5
  3. e3 e5
  4. Nc3 exd4
  5. Nxd5 Nf6
  6. Nxf6 Qxf6
  7. a3 dxe3
  8. fxe3 Bf5
  9. Nf3 Rd8
  10. Qb3 b6
  11. Bd2 Bc5
  12. Bc3 Qh6
  13. Bd2 Qe6
  14. Ng5 Qd6
  15. O-O-O Qe7
  16. Qb5 Rd6
  17. Nf3 Qe4
  18. Bd3 Qxd3
  19. e4 Bxe4
  20. Qxc6 Rxc6
  21. Ne5 Qc2

🕸📝Fergus Duniho wrote on Sat, Feb 25, 2023 10:24 PM UTC:

After the previous game, I turned up the strength of the Interactive Diagram to its maximum value of 4 ply and ran another game against Zillions-of-Games at 1 sec/move. I let the ID move first again. The game lasted longer, but Zillions-of-Games still won. Since Zillions-of-Games works with number of seconds instead of number of ply, I assume it fits in as many ply as it can calculate in the time it takes, and this may vary with the power of the computer. While my current computer is over a decade old, it is still considerably faster than the Windows 95 computer I had when I first got Zillions-of-Games.

  1. c4 Nc6
  2. f4 e5
  3. fxe5 Qh4
  4. g3 Qe4
  5. Nf3 Nxe5
  6. Bg2 Nxf3
  7. Bxf3 Qxc4
  8. b3 Qd4
  9. Nc3 Bb4
  10. e3 Qf6
  11. Nd5 Qxa1
  12. Nxc7 Ke7
  13. Nd5 Kd8
  14. Nxb4 a5
  15. Nd3 Qxa2
  16. Nc5 Kc7
  17. Bd5 d6
  18. Nd3 Nf6
  19. Bf3 Be6
  20. O-O Bxb3
  21. Qe2 Bc4
  22. Bb2 Bxd3
  23. Qxd3 Qxb2
  24. Rb1 Qe5
  25. Rxb7 Kd8
  26. Rxf7 Rc8
  27. Rxg7 Rc1
  28. Kg2 Re8
  29. h4 h6
  30. Rg6 Rh8
  31. Qd4 Qxd4
  32. exd4 Ke7
  33. Rg7 Ke6
  34. Rg6 Rc2
  35. d5 Kf7
  36. h5 Rxd2
  37. Kh1 Rc8
  38. Bg2 Rc1
  39. Kh2 Rcc2
  40. Kh1 Rxg2
  41. Rxh6 Rgd2
  42. Rxf6 Kxf6
  43. h6 Rc1

H. G. Muller wrote on Sun, Feb 26, 2023 08:46 AM UTC:

Zillions of Games should be considerably stronger than the Interactive Diagram, in most variants. Engines like Zillions or Fairy-Max typically search 7-8 ply, and examine 100K-500K positions per second, the ID only does about 1-5K positions/sec. More advanced engine typically reach 11-15 ply, Stockfish and the likes more like 20-30 ply.

Yet in some variants Zillions totally fails. There exists a Zillions implementation of Tenjiku Shogi, and it is not able to make a reasonable opening move no matter how long you allow it to think, while the ID is slow but plays sensible. I guess the algorithm for what to search in the ID is more stable.

The ID was not designed for strength, but as a nice sparring partner for a person that just learned the rules of the variant. But it would not play any moves that even a beginner would consider idiotic. (Like unforced sacrifices of a Rook for an obviously protected Pawn.) It will make tactical errors, but I tried to make those look human-like. By extending the depth for moves that a human would consider obvious (like capturing what attracts attention by moving, or playing a second move with a piece that you just moves, or which was discovered by that piece), but otherwise severely limit the depth to make it blind to what happens after 'non-obvious' moves.


🕸📝Fergus Duniho wrote on Sun, Mar 26, 2023 09:28 PM UTC:

I set up the Interactive Diagram to use different piece sets, and it works for three of them, but the other one uses different file names for the pieces. How can I make it know which file names to use for this set?


H. G. Muller wrote on Mon, Mar 27, 2023 05:34 AM UTC in reply to Fergus Duniho from Sun Mar 26 09:28 PM:

@Fergus: Each piece line in the description consists of 5 or 6 fields, separated by colons. The 4th field contains the root name of the image file. This defaults to the piece name specified in the first field. To create the full filename it will be prefixed with the graphicsDir and the white/blackPrefix strings, and suffixed with a period and graphicsType.

All fields are case sensitive.


🕸📝Fergus Duniho wrote on Mon, Mar 27, 2023 12:14 PM UTC in reply to H. G. Muller from 05:34 AM:

That field is already providing the correct name for three sets, but the Alfaerie set uses lowercase names instead of mixed-case names, and I want all four piece sets to work. How can I make an Interactive Disgram support multiple sets that do not use the same basenames for the same pieces?


🕸📝Fergus Duniho wrote on Mon, Mar 27, 2023 01:37 PM UTC in reply to H. G. Muller from 05:34 AM:

In an experiment I ran, I changed King to king in the 4th field. I had expected the King to show up for Alfaerie but not for the other sets. Instead, it did not show up for any set. Looking at the code, I saw I would also need to change the value of blackPrefix and whitePrefix. So, I got this far in finding a solution:

<input type="button" value="Abstract" onclick="graphDir='/graphics.dir/abstract/';whitePrefix='W';blackPrefix='B';Display();">
<input type="button" value="Alfaerie" onclick="graphDir='/graphics.dir/alfaerie/';whitePrefix='w';blackPrefix='b';Display();">
<input type="button" value="Magnetic" onclick="graphDir='/graphics.dir/magnetic/';whitePrefix='W';blackPrefix='B';Display();">
<input type="button" value="Motif" onclick="graphDir='/graphics.dir/motif/';whitePrefix='W';blackPrefix='B';Display();">

With this much, I tried the same experiment again, and the Kings showed up for Alfaerie but not for the other sets. If I knew what variables were used for the pieces names, I could change those too, and this solution should work.


🕸📝Fergus Duniho wrote on Mon, Mar 27, 2023 04:49 PM UTC in reply to H. G. Muller from 05:34 AM:

Here's the solution I came up with:

<input type="button" value="Abstract" onclick="graphDir='/graphics.dir/abstract/';whitePrefix='W';blackPrefix='B';imag[1]='Pawn.gif';imag[2]='Knight.gif';imag[3]='Bishop.gif';imag[4]='Rook.gif';imag[5]='Queen.gif';imag[6]='King.gif';Display();">
<input type="button" value="Alfaerie" onclick="graphDir='/graphics.dir/alfaeriePNG/';whitePrefix='w';blackPrefix='b';imag[1]='pawn.png';imag[2]='knight.png';imag[3]='bishop.png';imag[4]='rook.png';imag[5]='queen.png';imag[6]='king.png';Display();">
<input type="button" value="Magnetic" onclick="graphDir='/graphics.dir/magnetic/';whitePrefix='W';blackPrefix='B';imag[1]='Pawn.gif';imag[2]='Knight.gif';imag[3]='Bishop.gif';imag[4]='Rook.gif';imag[5]='Queen.gif';imag[6]='King.gif';Display();">
<input type="button" value="Motif" onclick="graphDir='/graphics.dir/motif/';whitePrefix='W';blackPrefix='B';imag[1]='Pawn.gif';imag[2]='Knight.gif';imag[3]='Bishop.gif';imag[4]='Rook.gif';imag[5]='Queen.gif';imag[6]='King.gif';Display();">

I also tried using SVG pieces, but only the white ones would show up. Game Courier handles this by using the showpiece.php script, but Interactive Diagrams do not. In case you would like to do something to allow SVG images to work for both colors in an Interactive Diagram, I have left up the button for it, whose code looks like this:

<input type="button" value="AlfaerieSVG" onclick="graphDir='/graphics.dir/alfaerieSVG/';whitePrefix='w';blackPrefix='b';imag[1]='pawn.svg';imag[2]='knight.svg';imag[3]='bishop.svg';imag[4]='rook.svg';imag[5]='queen.svg';imag[6]='king.svg';Display();">

H. G. Muller wrote on Mon, Mar 27, 2023 05:53 PM UTC in reply to Fergus Duniho from 01:37 PM:

OK, I see what you are trying to do now: change the pieces in a Diagram that already has been created through a button. The problem is that the definition lines for the pieces are processed when the Diagram is first created. At that time the field defining the image is stored in an array imag[], and suffixed with a dot and the graphicsType. The image URL is created at display time, by concatenating the graphicsDir, color prefix and imag[n].

So you would have to modify imag[n] for n=1 to nType, and set those to the required filenames (including extension, but without color prefix or directory path). In the articles where I used buttons to swicth the graphics (like Chu Shogi) I avoided that by making the root names for all piece sets equal, and distinguish them by white and blackPrefix.


🕸📝Fergus Duniho wrote on Mon, Mar 27, 2023 06:20 PM UTC in reply to H. G. Muller from 05:53 PM:

So you would have to modify imag[n] for n=1 to nType, and set those to the required filenames (including extension, but without color prefix or directory path).

I used an alert to tell me the value of imag[1] and it said "Pawn.gif". So, I modified imag[1] through imag[6] to have the correct piece names without the prefix or path, as illustrated in my previous comment.

At this point, I have introduced theming. Each button now also changes the colors of the spaces. I've added the Utrecht set, and I tried to change the size by changing the value of sqrSize, but it didn't work. I didn't bother changing squareSize, since it just passes its value to sqrSize.


H. G. Muller wrote on Mon, Mar 27, 2023 08:01 PM UTC in reply to Fergus Duniho from 06:20 PM:

The HTML table for the board (including style specifications for the size of the cells) is created in the HTML element with class="idiagram" when the page gets loaded, based on the variable settings resulting from the parsing of the description that initially was inside this element. To have later changes in the parameters describing the board (like number of files and ranks, square size, rank numbering, rim color, whole-board background image) take effect, you have to call CreateBoard(0, 1). (The 0 here indicates the Diagram number on the page, which starts counting at 0, top to bottom, so this assumes there is only a single Diagram on the page.)

Things like background color of the squares are applied during display of a new position, which can be ordered through calling Display().


🕸📝Fergus Duniho wrote on Mon, Mar 27, 2023 08:28 PM UTC in reply to H. G. Muller from 08:01 PM:

I added a call to CreateBoard(0, 1) just before Display(), and it does resize the board, but now none of the pieces show up. So, I'm going to revert it back for the time being.


H. G. Muller wrote on Mon, Mar 27, 2023 08:59 PM UTC in reply to Fergus Duniho from 08:28 PM:

If all else fails, you could try to completely re-initialize the Diagram: copy the definition back to where it originally was, modify it in the desired way, and call Init(). The original specification would be in diagDesc[0], and the HTML element where it was stored in diagList[0], so

diagList[0].innerHTML = diagDesc[0];

would restore the definition like it was loaded. You could append a line squareSize=... to the definition, which would overrule an earlier definition of squareSize. For the piece names it is probably easiest to change those afterwards in imag[n] than modifying their original definition.


🔔Notification on Sat, Apr 27 06:02 PM UTC:

The author, Fergus Duniho, has updated this page.


David Paulowich wrote on Sun, Oct 20 04:52 PM UTC:Excellent ★★★★★

ATTENTION EDITORS: the applet wants to play the illegal move 17... e7-e5 in the game below, ignoring the White Rook on e6. I wonder if two-step initial pawn moves were coded as leaps here. EDIT [10/22/2024] Thanks for all your work on these applets. The game now correctly ends with *** stalemate ***

1. h4 d6 2. Nf3 Bh3 3. Rxh3 Nc6 4. g4 Nd4 5. Nxd4 Kd7 6. Nf5 Ke6 7. Rc3 Kf6 8. Rxc7 Kg6 9. Rxb7 h6 10. Rxa7 Kh7 11. Rxa8 Nf6 12. Rxd8 Kg8 13. g5 Rh7 14. h5 Kh8 15. g6 Ng8 16. Rxd6 f6 17. Re6

At first glance, the final position arrived at might appear impossible, so I decided to provide a complete game, which can be copypasted into the chess applet here. Such "blockade stalemates" are highly unusual, but need to be kept in mind whenever you are writing brand new rules for a chess variant.


H. G. Muller wrote on Sun, Oct 20 08:39 PM UTC in reply to David Paulowich from 04:52 PM:

My bad. I wrecked the betza.js script in the attempt to also make the n modifiers work for larger orthogonal or diagonal leaps than 4 squares. In betzaNew.js I did it correctly. Now it should work in both (after browser-cache refresh).

The j modifier might not work as desired on larger leaps, though: it would require all intermediate squares to be occupied. I assume it would be more useful to require that only a single intermediate square is occupied.


17 comments displayed

Earlier Reverse Order Later

Permalink to the exact comments currently displayed.