Ludii Forum
A bug in Lielow - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Game Problems (https://ludii.games/forums/forumdisplay.php?fid=17)
+--- Thread: A bug in Lielow (/showthread.php?tid=725)

Pages: 1 2


RE: A bug in Lielow - Michael - 11-26-2021

Code:
Thanks a lot!



RE: A bug in Lielow - Michael - 08-26-2022

(11-25-2021, 10:38 AM)Michael Wrote: I have found yet another bug in Lielow. This one is mine, though. It comes from a misunderstanding of how (and) works. The consequence of the main ludeme inside (play) currently looks like this:

Code:
(and
    (remove (sites Outer) count:(size Stack at:(last To)))
    ("UpdateKing")
)

But it needs to be:
Code:
(do
    (remove (sites Outer) count:(size Stack at:(last To)))
    next:("UpdateKing")
)

I mistakenly thought (remove (sites Outer) count:(size Stack at:(last To))) was called before ("UpdateKing") either way.

Can you make this change? I'm afraid my local file is not up to date.

In light of what I have now learned about (do next:), this needs to be 
Code:
(do
    (remove (sites Outer) count:(size Stack at:(last To)))
    next:("UpdateKing")
    (pass)
)
or something functionally equivalent.


RE: A bug in Lielow - Michael - 08-31-2022

(08-26-2022, 05:20 PM)Michael Wrote: In light of what I have now learned about (do next:), this needs to be 
Code:
(do
    (remove (sites Outer) count:(size Stack at:(last To)))
    next:("UpdateKing")
    (pass)
)
or something functionally equivalent.

Sorry for the confusion. That didn't make sense. What I meant is that ("UpdateKing") needs to be like this:
Code:
(define "UpdateKing"
    (if
        (= 1
            (count Sites
                in:(forEach
                    (sites Occupied by:Mover)
                    if:(=
                        (size Stack at:(site))
                        (max
                            (results
                                from:(sites Occupied by:Mover)
                                to:0
                                (size Stack at:(from))
                            )
                        )
                    )
                )
            )
        )
        (forEach Piece
            (if
                (=
                    (size Stack at:(from))
                    (max
                        (results
                            from:(sites Occupied by:Mover)
                            to:0
                            (size Stack at:(from))
                        )
                    )
                )
                (set State at:(from) 1)
                (set State at:(from) 0)
            )
            Mover
            top:True
        )
        (pass) //THIS IS NEW
    )
)



RE: A bug in Lielow - Eric Piette - 08-31-2022

Hi,

Soooo should I update something for Lielow? Or are you going to submit the updated file here?

Eric


RE: A bug in Lielow - Michael - 08-31-2022

I will upload a new file when it's ready.
Sorry that I wasn't clear.