Ludii Forum
show all legal moves in a hop sequence at once - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Questions (https://ludii.games/forums/forumdisplay.php?fid=13)
+--- Forum: About the Ludii Grammar (https://ludii.games/forums/forumdisplay.php?fid=15)
+--- Thread: show all legal moves in a hop sequence at once (/showthread.php?tid=755)



show all legal moves in a hop sequence at once - sharmoni - 11-18-2021

This quote is from a thread in Game Problems: Issue with nested (sites Around in new game Infuse https://ludii.games/forums/showthread.php?tid=264

(11-23-2020, 09:07 AM)Eric Piette Wrote: Hi,

by "it would useful to have a ludeme that selects the results of moving n times sequentially, to use when it is sufficient for the player to simply choose the end position without having to specify every point along the route to get there."

You mean if the player can move a piece n times with a specific move (like step or even Hop), you would like all the final destinations after that sequence of move to move directly there in one move? is that right?
Maybe that would be clearer with an illustration/example of a specific case.

Regards,
Eric

I don't necessarily need a ludeme for this, I just need to know how to code it. So far I've only found examples of hop sequences that use moveAgain and Pass.

My game (Batalo) uses hop sequences as well as slides, and since winning is primarily by reaching a goal I want to know if a sequence of hops will reach that goal at the beginning of making the move (just as a slide will show me all the legal spaces that can be reached).

This seems crucial for an AI to understand the best moves to make. Also it seems necessary for setting a priority for winning moves of reaching the goal as opposed to simply capturing all opponent's pieces (which is also a win condition by virtue of the opponent no longer being able to stop the player from reaching the goal).

PS: the option to stylize text or add attachments in posts is no longer available (I had to hand code for bold and italic)


RE: show all legal moves in a hop sequence at once - Eric Piette - 11-19-2021

Hi,

I am not completely sure of what you mean, sorry.
But as far as I can understand, you mean some moves like a flying king in international draughts, no? Because yes we are able to do that, you can look the .lud description of this game for example.

If you mean anything else, I would need an example from you to understand what you mean here.

Regards,
Eric


RE: show all legal moves in a hop sequence at once - sharmoni - 11-19-2021

Here's a screen capture to show what I want.

   

The left image shows how a hop sequence appears in legal moves on the first hop (I added the blue dot to show which piece is moving). The right image is how I would like the hop sequence to work: where you can move your piece directly to any point in the chain of hops without needing to make each intermediate hop.


RE: show all legal moves in a hop sequence at once - Eric Piette - 11-23-2021

Hi,

Ok so you just want all the possible jump of a piece including the ones after a hop sequence....
We never did that so I can't provide to you a description already done for it, that's something I would have to try to see if I can get these legal positions.... If I have some time I will look.

Regards,
Eric


RE: show all legal moves in a hop sequence at once - sharmoni - 11-23-2021

Thanks, no rush. I appreciate you looking into it. I'm not familiar enough with ludii to figure it out easily myself.