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/Ratings for a Single Item

Later Reverse Order EarlierEarliest
Conquer II. The goal of the game is to conquer the opponent's army and to add it to your own army. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
💡📝Gerd Degens wrote on Sat, Feb 10 07:29 AM UTC in reply to H. G. Muller from Fri Feb 9 08:07 PM:

Where is the Diagram you played this with? 

The diagram comes from my variant 'Nasty Neighbours (conquer style)'


H. G. Muller wrote on Fri, Feb 9 08:07 PM UTC in reply to H. G. Muller from 01:35 PM:

Where is the Diagram you played this with? In your screenshot the board has 9 files, but the Diagrams in Conquer and Conquer II only have 8 files...


H. G. Muller wrote on Fri, Feb 9 01:35 PM UTC in reply to Gerd Degens from 01:14 PM:

In any case it seems that the SAN generator should be fixed to handle this game, as it appears to mistake many moves for castlings...

But now that I have a position I can look in detail what causes the crash.


💡📝Gerd Degens wrote on Fri, Feb 9 01:14 PM UTC in reply to H. G. Muller from 09:32 AM:

I hope this solves the problems with crashing in Conquer. (After refreshing your browser cache.) If not, let me know.

I have refreshed the browser cache, but it seems that loops still occur, as the two examples show: 

 


H. G. Muller wrote on Fri, Feb 9 09:32 AM UTC in reply to H. G. Muller from Fri Feb 2 02:18 PM:

I now made a slight modification in the Diagram's AI (of betzaNew.js): the condition under which a move is always searched is changed from total gain > value of capturer (which in conquer could go on for ever, with a crash as result) to one where this only holds for moves that do not unload anything, and that moves that do unload something are only searched if they capture a piece of a type higher than their own. (This assumes pieces in the table are sorted by increasing value.) This thus discards the gain from the recruitment; in the old way RxR would gain you two Rooks, and would qualify; now it no longer qualifies, as R=R. It would still always search RxQ, but then two half-moves later not the reverse QxR, even though in the old way 2R might be more valuable than Q.

I hope this solves the problems with crashing in Conquer. (After refreshing your browser cache.) If not, let me know.


H. G. Muller wrote on Fri, Feb 2 02:18 PM UTC:

I guess a less restrictive limitation on the search could still always allow capture to the same square of a higher valued piece by a lower; this must always become impossible at some point, even when the captured pieces somehow regenerate.


💡📝Gerd Degens wrote on Fri, Feb 2 01:37 PM UTC in reply to H. G. Muller from 01:23 PM:

Thank you, that sounds good!


H. G. Muller wrote on Fri, Feb 2 01:23 PM UTC in reply to Gerd Degens from 12:46 PM:

Indeed, at this stage we are still far from being able to handle this. The first step would be to equip the AI with true repetition detection, instead of merely discouraging immediate back-and-forth moving for the side that is ahead. After that we can introduce a parameter to control the game result in case of a repetion (draw, loss for the repeater, loss for the checker, ...)

It should be possible to prevent the AI from crashing by 'perpetual recapture' already by simpler means, though. The idea for always allowing this was that sooner or later you would run out of pieces to capture to a given square. But when you capture from the same square as two half-moves before, this might not be the case, as obviously the capturing piece got somehow replaced. So such repeat captures should be exempted from the 'free recapture' rule.

Problem is that it might not always be the previous move. I can imagine positions where each player has two Rooks attacking a square with a Queen, and then alternately capture from the one square or the other. So I suppose I should consider any move that unloads something as suspect, as it violates the assumption that the capture decreases the board population, so that you must sooner or later run out of those. The question is whether not always searching such recaptures would not unduly weaken the AI, though. But anything is of course better than crashing it.


💡📝Gerd Degens wrote on Fri, Feb 2 12:46 PM UTC in reply to H. G. Muller from 11:43 AM:

(Which can go on forever, and then crashes the program.)

That's it; whenever I try to apply the conquer mechanism to other variants, the programme aborts after a few moves and the possibility of testing the variant is lost.

...unless the rules really are such that repeats are forbidden.

This is exactly the case with the conquer rule - repeats are forbidden.  That's precisely the crucial question of how this can be implemented in the programme. If I understand or interpret you correctly, this seems to be impossible or only possible with disproportionate effort and you don't really want to deal with it.


H. G. Muller wrote on Fri, Feb 2 11:43 AM UTC in reply to Gerd Degens from 09:49 AM:

Repetition is a weak spot of the ID anyway; it does not really keep record of the entire game history as a list of 'position signatures' with which it could easily compare the current position. It is aware of the two last-played half-moves, though, and uses those to determine which natural continuations it should still search near the end of its search tree. What it does now is give a slight penalty for moving the same piece as two half-moves earlier, and reduce positive scores by a factor 50% if such a move goes also back to the square it came from, and the earlier one was't a capture. (Even though this might not cause a repetition, it would allow the opponent to reach one if he wants too, and should thus be considered a draw offer.)

In the normal case the shortest repeat loop has 4 half-moves, and requires moving pieces back and forth. So this is what the ID tries to detect in the way described above. In the conquer case repeats can already occur after 2 half-moves, and are brought about by doing the same move instead of the reverse one. So this escapes detection, and fatally interferes with its search strategy to always search moves that recapture to the same square. (Which can go on forever, and then crashes the program.)

Note that the ID never announces a draw by repetition. It only uses the information during its search, to make it aware that certain sequences of moves will not make any progress, and would not be able to convert any advantage that it thinks it has into a win. So that the side that is ahead would avoid these sequences, even if they are the only ones that preserve the advantage it imagines it has. E.g. if you are a Queen ahead, but can only escape perpetual check by sacrificing a Rook, it should not prefer the perpetual just to hang on to the Rook. OTOH, if it is a Rook ahead, and can only escape the perpetual by sacrificing a Queen, it would be preferable to opt for the perpetual; the alternative would likely make you lose. If the repetion would have been forbidden, rather than discouraged by giving it a draw score, it would have no choice but sacrificing the Queen, and lose. So this is not a good idea, unless the rules really are such that repeats are forbidden.


💡📝Gerd Degens wrote on Fri, Feb 2 09:49 AM UTC in reply to H. G. Muller from Thu Jan 11 11:03 AM:

As for the conquer problem; I believe I solved that by not considering a move that came from the same square as two ply earlier a recapture that should always be searched, but rather as a draw indication. But code for that seems no longer to be there either.

@H.G.
It's a pity that the code is no longer available. On the other hand, such perpetual recaptures occur more frequently and earlier in the conquer rule, so that a draw decision would come too early. 

Wouldn't it be better if, instead of a draw announcement, a move that was already made two moves earlier was treated as no longer executable? If nothing other than a repetition is possible, this would mean a draw. Otherwise the game could continue normally without perpetual recapture.

Well, you can wish for something without knowing what effort is involved. I apologise for that. And you can certainly argue about whether the conquer rule is an enrichment. In any case, it leads to differentiated strategic considerations and that is at least something.

That's why I'd like to ask you whether you'd like to deal with this topic again? It would certainly enrich the diagram script. :)


A. M. DeWitt wrote on Fri, Jan 26 04:39 PM UTC:

I'm not sure how a change to the Pawn move will make the game less drawish. Regardless, the page is good enough to be approved.


💡📝Gerd Degens wrote on Thu, Jan 11 03:53 PM UTC in reply to Gerd Degens from 09:33 AM:

The question is, why did the AI drop out in this constellation? It has nothing to do with permanent recaptures - or does it?


💡📝Gerd Degens wrote on Thu, Jan 11 11:16 AM UTC in reply to H. G. Muller from 11:03 AM:

That sounds promising. If something has gone missing, it doesn't mean that it can no longer be found. Perhaps you can shed some light on the black box. It would certainly help others, not just me.


H. G. Muller wrote on Thu, Jan 11 11:03 AM UTC in reply to Gerd Degens from 09:33 AM:

I vaguely recall that at one point I had solved this problem of perpetual recapture in the AI. But it seems we somehow suffered a regression in the Diagram script; a few weeks ago I also noticed that it was no longer displaying the Fire Dragon in MinJiku Shogi, because it added a .png suffix on a file that already has a .gif suffix. And I am absolutely sure it did display that before. But the code for suppressing duplicat suffix had disappeared.

As for the conquer problem; I believe I solved that by not considering a move that came from the same square as two ply earlier a recapture that should always be searched, but rather as a draw indication. But code for that seems no longer to be there either.


💡📝Gerd Degens wrote on Thu, Jan 11 09:33 AM UTC:


satellite=conquer files=8 ranks=8 maxPromote=0 promoZone=1 promoChoice=NBRQ graphicsDir=/graphics.dir/alfaeriePNG/ squareSize=50 graphicsType=png symmetry=none pawn:P:fWfcnD:pawn:a2,b2,c2,d2,e2,f2,g2,h2,,a7,b7,c7,d7,e7,f7,g7,h7 knight:N:N:knight:b1,g1,,b8,g8 bishop:B:B:bishop:c1,f1,,c8,f8 rook:R:R:rook:a1,h1,,a8,h8 queen:Q:Q:queen:d1,,d8 king:K:KisO2:king:e1,,e8


The problem of perpetual recaptures is now significantly reduced. If moves are generated exclusively by the AI, then the diagram can reach its limits - even in cases without perpetual recaptures (no idea why this is the case). If only the AI is playing, then it is smoother if the ply factor is set to 1.0 or 1.5. GC requires human partners and does not know these problems.

🔔Notification on Thu, Jan 11 09:28 AM UTC:

The author, Gerd Degens, has updated this page.


💡📝Gerd Degens wrote on Thu, Jan 4 08:30 AM UTC in reply to Gerd Degens from Wed Jan 3 07:08 PM:

Perhaps one more note:
The playability of Conquer does not depend on the AI, which reaches its limits in terms of programming, but on how players deal with perpetual recaptures, if they still occur in Conquer II. The games on GC have not shown any problems so far.

In this respect, it would be nice if there were an interactive diagram for Conquer II. This would show whether the AI copes better with this version.


💡📝Gerd Degens wrote on Wed, Jan 3 07:08 PM UTC in reply to A. M. DeWitt from 06:28 PM:

There's another caveat as well - the function's current form doesn't work very well with the AI. As soon as the AI gets to around 6 moves it just stops functioning.

H.G. has created an Interactive Diagram for the basic version 'Conquer the opponent's army'. For this diagram it is known that the AI cannot handle perpetual recaptures because there is no counter for such recaptures in the diagram.

With 'Conquer II' I tried to minimize the perpetual recaptures by changing the pawn move. As far as I know, there is no interactive diagram for Conquer II. It is possible that even such a diagram will reach its limits at some point, as perpetual recaptures cannot be excluded. However, this only happens if the AI is playing against itself. With a little human skill, constant repetitions can be avoided.


H. G. Muller wrote on Wed, Jan 3 07:06 PM UTC in reply to A. M. DeWitt from 06:28 PM:

There's another caveat as well - the function's current form doesn't work very well with the AI. As soon as the AI gets to around 6 moves it just stops functioning.

This could be a general problem of the AI, in particular inability to handle a variant with these rules, which the function enables. The AI normally always considers recapture to the destination of the preceding move, in quiescence search. But the recruiting of the captured piece creates the possibility that such capture sequences continue indefinitely, with infinite recursion (and hence crash of the script) as a consequence.


A. M. DeWitt wrote on Wed, Jan 3 06:28 PM UTC in reply to H. G. Muller from 06:22 PM:

There's another caveat as well - the function's current form doesn't work very well with the AI. As soon as the AI gets to around 6 moves it just stops functioning.


H. G. Muller wrote on Wed, Jan 3 06:22 PM UTC in reply to A. M. DeWitt from 05:54 PM:

function conquerTinker(m) { var v = board[m[3]][m[2]]; if(v & 511) m[4] = m[0], m[5] = m[1], m[-2]++, m[-5] = v ^ 1024; return 0; }

Indeed, you can simply copy this custom addition to the Diagram script and include it on the page where you have a Diagram that you want to do the same.

Caveat is that it is called 'conquerTinker' because the Diagram to which it belonged hade satellite=conquer amongst its definitions. If you want to use it with a Diagram that has satellite=xxx instead, you should call it xxxTinker. (This so that when there are multiple Diagrams on one page, each can know whether the function should be used by them, or ignored.)


A. M. DeWitt wrote on Wed, Jan 3 05:54 PM UTC in reply to Gerd Degens from 06:12 AM:

This is quite the novel idea...

Also, there is already a JavaScript function to do this, from the Interactive Diagram on the Conquer The Opponent's Army page. No u modifier required.

function conquerTinker(m) { var v = board[m[3]][m[2]]; if(v & 511) m[4] = m[0], m[5] = m[1], m[-2]++, m[-5] = v ^ 1024; return 0; }

💡📝Gerd Degens wrote on Wed, Jan 3 06:12 AM UTC in reply to A. M. DeWitt from Tue Jan 2 09:15 PM:

It is very much possible. You just don't know how to do so (see this page for details). The Conquer II Pawn can be described as fWncD or fWfafcW.

Thanks for the tip, I am familiar with the page. It is also clear that the u modifier must be used here. The problem is that the captured piece should take on the colour of the capturing party and, according to H.G., this is not possible without additional programming. That's my hurdle. The Betza notation for the pawn is not the problem.


Bob Greenwade wrote on Tue, Jan 2 10:50 PM UTC in reply to A. M. DeWitt from 09:15 PM:

I think the part that Gerd's talking about is how, when a piece is captured, it's deposited where the capturing piece started (easy, with a u) of the capturing piece's color (harder).


25 comments displayed

Later Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.