Ludii Forum
Refugia game infinite passing at the end of a trial - 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: Refugia game infinite passing at the end of a trial (/showthread.php?tid=335)

Pages: 1 2


Refugia game infinite passing at the end of a trial - dale walton - 12-16-2020

Attached is a game I scripted for testing.
The main problem is in the subject line:

It seems an All Passed end condition is not being triggered when the first pass was forced (even though (move Pass) is always a legal option for every turn)
Edit: - or is it thinking Neutral didn't pass? Or is my "(end ...) scripting wrong?

Other issues: The neural "Fan" image:"fan" piece is shown on top of a letter "A"  - which I have not asked it to do anywhere.

Also (sites Occupied by:NonMover) is not working as I expected/hoped - seems to behave like Next. So I had to do a workaround.

The documentation shows NonMover as an option.  If this is how it is supposed to work then "NonMover:Players who are not moving" should add a reminder note that "Neutral is not a player but only a role, so NonMover does not include Neutral"

I suppose the distinction is that Neutral never takes a turn of it's own and so is not a decision making entity.


RE: Refugia game infinite passing at the end of a trial - MatthewStephenson - 12-16-2020

Hi Dale,

Regarding the Fan graphics. Are you running on Linux, Windows or OSX?

Depending on your Java setup, your current working directory may not be the same as the .jar location. Instead you need to place the svg file in the same location as where the Ludii preferences (ludii_preferences.json) is stored.

Cheers,
Matthew


RE: Refugia game infinite passing at the end of a trial - dale walton - 12-16-2020

Linux.  The graphic is in the Ludii directory which contains the jar. The fan graphic shows using the Load tab, and shows in the game.  However there is a Capital A under it (or over it if I reference it as Background in the graphics section.)

I don't see any ludii_preferences.json  Is it optional, or is it inside the .jar?

P.S. I give my permission for you to include the Fan piece I created in Ludii under the same terms that Ludii is licensed for use.


RE: Refugia game infinite passing at the end of a trial - MatthewStephenson - 12-16-2020

Hi Dale,

If you are on linux and are not running the jar through the command line, then your current working directory is likely just your home folder. You should be able to see the ludii_preferences.json there.

If you place the fan graphics in this location then it should work.

Cheers,
Matthew


RE: Refugia game infinite passing at the end of a trial - dale walton - 12-16-2020

I am running it from the command line after changing to the Ludii directory.  Ludii is currently running as well.

What do you mean by "work"? It is "working" in the sense of showing my graphic. But take a look at what shows carefully: there are two small "feet" sticking out from the bottom of the graphic that are not part of the graphic, but rather part of a character "A" that the program has graciously added gratis. - You can see it in full if you change the  (piece Background ... to (piece Foreground ...


RE: Refugia game infinite passing at the end of a trial - MatthewStephenson - 12-16-2020

Hi Dale,

No I mean current working directory for Java.
https://stackoverflow.com/questions/3153337/how-to-get-current-working-directory-in-java

Whenever you close the Ludii jar we try to store your preferences in a ludii_preferences.json file in your current working directory. If you can find where this file is then this will give the location where the svg should be put. On Linux it is usually either the home directory or the location of the jar file, can you try placing the SVG in your home directory?

Cheers,
Matthew


RE: Refugia game infinite passing at the end of a trial - MatthewStephenson - 12-16-2020

Hi Dale,

If you still cannot locate it, I will add a menu option for the next Ludii release to display your current working directory. This will be where the SVG files should be placed.

Cheers,
Matthew


RE: Refugia game infinite passing at the end of a trial - dale walton - 12-16-2020

OK. The reason I couldn't find it is because it doesn't exist when the program is in use. (I did mention that I had it in use, didn't I?)
The directory it is in is the Ludii directory, which isn't surprising, since that is where my graphic is, (and I did say that Ludii was finding it.)

Can we now get to addressing the stated problem, which was that a letter "A" appears under it?

Of course I do understand the need to  "check the plugs" when debugging problems...


RE: Refugia game infinite passing at the end of a trial - MatthewStephenson - 12-16-2020

Hi,

The issue is that your svg is called "fan" but your piece is called "Fan".

Renaming your svg to "Fan" should fix your problem.

In the next version of Ludii, we will remove this case-sensitive restriction.


RE: Refugia game infinite passing at the end of a trial - dale walton - 12-16-2020

Thanks, that worked after I renamed it in my script. It was picking up the file in either case. And I did not check whether it was optional to rename the file in the directory, as you will be fixing this in any case.

Another point is that it previously took me a long time fiddling around with the svg file to get Ludii to diplay the same thing as the path command stated.
I hope you can soon incorporate an off-the-shelf svg interpreter to create the images from the files, so that I can just clean and strip down my Inkscape svg file automatically to produce pieces and backgrounds.