Comments/Ratings for a Single Item
OK, I see. The piece you click should have moves that get highlighted, in order for the Joker to imitate it. This was a consequence of introducing legality testing on highlighted moves, which must make the move first. I now save the old value of the imitated type before starting the legality test, and restore it afterwards. That should fix it.
I have sent my diagrams in an email.
But can you give an example where it happens? Is this a betzaNew.js problem or did betza.js already suffer from it?
Regarding my previous comment. I was not talking about the current work on transferring powers, but at an older issue.
It seems that the imitated move changes when I click a piece and not just when the opponent moves. This is undesirable.
Nice idea about the recursivitty of the transferrer.
OK, I see. But this is only in the start position, right?
I suppose there is a more serious issue where "works as designed" does not cover "works as desired": when a Joker is moved the other Joker in the next (half) move still imitates what that Joker imitated. Instead of the mapping of what it imitated.
Click a piece then click Joker.
I don't understand what you mean. This happens in the Diagram I posted? Cnan you give an example of what exactly I have to do to see something irregular?
Oh, I have forgotten to say. There is a bug with the joker again. Now it imitates the latest of the last piece moved by the opponent or the last piece clicked. Now your plate is full!
Well, this was the easy part, so I thought I might as well do it immediately. I just had to replace 'imi' by 'imiTable[imi]' in the move generator, and make sure an initialized imiTable would always be present. The harder part is how to make it possible to specify an imiTable in a Diagram-specific way, as a parameter. (Probably using piece IDs, perhaps comma-separated to allow multi-character IDs, etc.)
I see the script line but not the desired effect!
Thanks a lot, HG! I was not expecting this so quickly. I am very gratefull!
To get you going I have now made the preliminary change in betzaNew.js that it uses a predefined array 'imiTable' to decide what is imitated. If no such array is defined, the I.D. creates one, and initializes it as imiTable[i] = i for standard imitator behavior. It can be defined by embeded JavaScript in the page. (Which would then affect all Diagrams on that page!) In this comment I embedded:
<script>var imiTable = [0, 2, 3, 4, 5, 7, 6, 1];</script>This causes a move of type 1 (Pawn) to make the Joker move as 2 (Knight), etc. View in isolation, flushing browser cache to make it work!
I'll be patient about the imitator thing. I understand you have a real world life. Do not worry! Also I don't know any other applications!
I am very busy at the moment with real-estate matters (renovation of one apartment, and attempts to buy and move to another place), which leaves me very little time to work on chess programming. So the general AI written in C will still stay on the back burner for some time. The mandatory-capture feature was surprisingly simple, because it used the already existing capture matrix, and took me just a few hours, so I could squeeze it into my schedule. What also helped is that it was a feature that potentially had wide application, amongst which one of the most popular chess variants (Suicide Chess). A generalized Joker seems a niche application I never heard of before you brought it up. It would probably require more work, and that I generally dislike imitators didn't help its case either. But if you are eagerly waiting for it I will try to give it somewhat higher priority.
I like Scirocco (as well as Chu Shogi, by which it is clearly inspired) because the emphasis is on relatively weak pieces there. Most variants have a disproportionally large fraction of queen-class pieces, often not adding any minors at all. And I like subtlety better than the brute force this leads to. In large variants the goal of checkmate is usually impossible to achieve until very late in the game, the King sheltering behind several layers of defending pieces. In the mean time you can only hope for a tactical mistake by the opponent leading to a trade that gains some material. In Scirocco promotion can be a second objective, which often gains you more than a piece exchange. It is difficult to defend against even when most of the pieces are still there, because the initial pieces on average are pretty weak. And the large depth of the promotion zone makes it readily accessible even if there are still many pieces; you don't have to fight your way to last rank, like you would have to do to get at the King. And all pieces promote, even the relatively fast ones. So you are always in danger, during every phase of the game.
In addition Scirocco has some peculiariarities that are not very common, such as Checkers-like capture and move induction. (Like Chu Shogi has the multi-leg moves.) Without overdoing it by making too many pieces have these exotic properties. That there are many different pieces might be intimidating for an orthodox Chess player, but as a veteran chess-variants enthousiast I am already familiar with most of those.
I would not say your Apothecary creations are very complex; Brouhaha squares seem pretty easy to grasp. They are just large.
I am curious about your to do list in two ways. It will also be helpful to know these two things, because their moving forward or not, influences my path of designing and testing new games.
- Do you intend to implement the generalizations for the joker that we were talking about?
- Any progress in your very general C++ AI?
I am writing programs of my own for the games I'm designing, but even if I'm moving forward I'm not very fast. Also later on I'll need advice from you (because I don't know where else I can ask) in writing a xiangqi, shogi and chu shogi(or more likely apothecary versions for that :) ) AIs.
Once again thanks for your time. By the way, why is scirocco one of your favorites? It is a bit complex. I'm asking because my creations are considered too complex too. I decided to tone down things (no more brouhaha squares, for example), but I'm interested in what makes a game with a steppe learning curve interesting.
Also make sure that graphicsDir contains a valid URL to the piece images. If you want to use those on CVP from home, you should add the website, otherwise it will search the images on your own machine. (Which would be OK if you copied those there.)
If the diagram of yours runs in a browser, try looking at the browser console via the right-click + Inspect option (or equivalent). That might help you identify the problem.
If you are using his Interactive Diagrams for your diagram, the following could be helpful. If not, disregard it.
On top of providing the HTML definition you also need to point to the JS script in an HTML script element pointing to it, like so:
<script src="https://www.chessvariants.com/membergraphics/MSinteractive-diagrams/betzaNew.js?nocache=true">
You also have the option of copying the script to a local file for testing without Internet access.
Also, make sure you're copying the whole section when you copy the sourcecode. Missing even a single character can throw things off. For reference, the Diagram starts at <div class="idiagram"> and then ends at its corresponding </div> tag.
I'm trying a chess with different armies locally, but it does not work. If I copy paste the exact diagram I get a black white screen (edge). Any idea why?
I think the more important question is whether (some of the) power pieces should be subject to some anti-trading. In original Dai this was not the case, but that could be one of the reasons it was replaced by Chu in terms of popularity. Tenjiku Shogi also has no anti-trading rules. But I actually played that, and even after trading away the Fire Demons and neutralizing the danger of the jumping generals it remains an enormously tense game, because you can get back a Fire Demon through promotion. Which creates an immediately winning imbalance. The Water Buffalo's themselves are only average pieces (by Tenjuku standards), and are not easily traded. So equiping some less important pieces with decisive promotions might be an alternative to anti-trading for keeping a large game exciting.
I think I will go down the Tenjiku path with Reiwa Dai Shogi, but include moves that reference all the moves found in the historical large variants in some way (including Ko and Taikyoku Shogi), but perhaps in more modest amounts. Here are some of my ideas for the new moves:
- Half-Hook Move (RyasRyasW or ByasByasF), a more workable version of the normal Hook Move.
- Jumping Igui (cabS, cabD, cabA, cabN), referencing Ko Shogi's shooting pieces
- Burn (spellZone = F or W)
- Some sort of sliding jump to reference Tenjiku Shogi's jumping sliders
- Some sort of area move to reference Tenjiku Shogi's area move
seems I inadvertantly deleted too much in the latest patch; the routine Illegal(), which tests legality, was no longer called at all.
I fixed that now.
I discovered one last bug. The highlights of the crosses for the royal pieces and anti-trading rules are no longer being displayed correctly.
Bug Example shown below. To replicate, simply move the Lions close to each other or the King close to an enemy piece.
However, I discovered a new bug where any piece that makes a move to a non-highlighted square will burn/move/make pieces. The squares that get affected are a bit unpredictable though. This also appears to apply to diagrams where the spell parameter is not set, such as this one.
This should be fixed now too. It was a consequence of the partial revert of the legality patch, which moved the 'scoring' back to after the move was selected, instead of scoring each move in the move list. But illegal moves are not in the move list, and one is synthesized based on the origin and destination click when no move in the list that satisfies the clicks is left. I had forgotten to remove the scoring of that synthetic move, so that it was scored twice. The first scoring replaces the 'no promotion' code 0 by the encoding of the piece itself. But the second scoring then interprets the 'has moved' bit of this piece as the encoding of a burn. What exactly gets burned is then determined by the type number of the piece.
25 comments displayed
Permalink to the exact comments currently displayed.
I now also made it such that after a Joker move the imitated type is mapped to a new type as well, rather than staying the same. So the rule is that a Joker imitates the defined 'successor type' of the last moved or imitated piece type. Where by default the successor of each type is the type itself.