Ludii Forum
Simply adding an action related to edges changes execution of the script - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Ludii Player Problems (https://ludii.games/forums/forumdisplay.php?fid=6)
+--- Thread: Simply adding an action related to edges changes execution of the script (/showthread.php?tid=643)



Simply adding an action related to edges changes execution of the script - dale walton - 07-12-2021

I've spent 2 days trying to isolate this problem and pare down the result enough for you to look at. I hope you can find and fix the bug:

The trial shows the bug: The last two pieces played show as selectable, but the logic say they shouldn't be.

If you then comment out the "RemoveDiagonals" define, so that the script no longer references edges anywhere, the script works correctly.


RE: Simply adding an action related to edges changes execution of the script - Eric Piette - 07-19-2021

Hi,

I guess you mean the define "RemoveExcessDiagonals" ? Right?

I identified the problem and fixed it, will be in the next release.

Regards,
Eric


RE: Simply adding an action related to edges changes execution of the script - dale walton - 08-05-2021

Thanks for that.

Sorry if my scripts get convoluted.
I learned to program 50 years ago and the paradigms and capacities of computers were very different then - so I find myself over-constraining the system, and then figuring out how to cut it back to something that makes sense to a system that works in parallel rather than in strict sequence, and doesn't fully encapsulate the data for sequential use within a move. This approach makes is very hard to isolate bugs, leading to a creative, trial and error approach...

Also my games can be a challenge for the ludemes provided. A quick-fix on some games with ifAfterwards can have a very high penalty on a large board, but preprocessing to avoid it can be very complicated...

---------------------------------
I notice many language enhancements, but sometimes don't know how to use them to best advantage.

For example, is it possible to define a connectivity as a series of steps with (to) constraints, as opposed to adjacency, and then use all the group functions with that defined group type? (such as counting how many are in the board, getting the number of member pieces, etc) I suspect so but don't know how to construct it... maybe I am finding a way, but there may be more natural efficient ways.