Ludii Forum
Remember Values <string> - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Grammar Problems (https://ludii.games/forums/forumdisplay.php?fid=24)
+--- Thread: Remember Values <string> (/showthread.php?tid=386)



Remember Values <string> - dale walton - 01-24-2021

I've been getting an error "Could not match string "...  For the string in (remember Values "Max0" (...))  Where for example  (hop (from (sites (values Remembered "Max0"))) (between (exact:2)) (to if:(is Empty (to)))) exists. It is in a subsequent consequence in the same decision move.  Please check if this is a compiler bug. I will continue to look in my logic as well.

It was in reference to the following define (and a lot of other tries similar in nature)
BTW: the define will be to heavy to execute, but would appreciate it as an internally coded ludeme that could run in comparatively reasonable time.


RE: Remember Values <string> - Eric Piette - 01-26-2021

Hi,

I do not have any (game ...) ludeme in the file you posted here, so I am not able to test it.

Regards,
Eric


RE: Remember Values <string> - dale walton - 01-26-2021

Hi, I was not asking to test it, but giving it as an example of a move algorithm that Involves many inherently sequential steps, and thus is quite slow for Ludii to handle in an accurate way. It was designed to find the follow-up locations for the destination of a turn, after an initial placement/capture/selection at the starting location.

The request is whether you could provide this type of move as a directly coded algorithm. 

Thus instead of supplying you with the full game using that define, I will first supply you with the working game, but coded in a different way, that divides the single move into a series of many separate decision moves  - which suffers from different problems: 1) The program can't properly identify a turn for the record. 2) the game has a double turn structure, but the player doesn't know when the transition from the first to the second of the double turns occurs, causing confusion in play, and 3) the AI plays nonsense moves most of the time, even on slow settings and takes time for each decision of the turn - so maybe 4-10 times the actual move time to finish its full double turn. For these reasons, I want to combine all the separate possible decisions within a given turn into a single decision, and preferably, into a single move. - And much preferably into a special Ludeme.

A move, in this game, consists of choosing a location, establishing a piece there if it isn't there already, and then moving it up to a certain distance that depends on the location's environment: The last part is the needed ludeme, because this travel-distance-limited move is taken as a series of any number of hops-to-empty.

Currently the only way to do this is as a series of up to 7 hops (the maximum travel distance) with lots of tests, and the calculation will give the wrong results if the results of each stage are merged or performed concurrently, making it very heavy to execute - or even to script in Ludii.