Seeds of Destruction: A Puzzle Game

For general discussion about Conway's Game of Life.
User avatar
Scorbie
Posts: 1445
Joined: December 7th, 2013, 1:05 am

Re: Seeds of Destruction: A Puzzle Game

Post by Scorbie » November 2nd, 2015, 6:33 am

@Sphenocorona Great job. I guess you would be sleeping by now, but it works real nice on 32bit linux. (Or, a 32bit ubuntu derivative at least.) My netbook chokes on it though :(
Best wishes to you, Scorbie

User avatar
dvgrn
Moderator
Posts: 6523
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Seeds of Destruction: A Puzzle Game

Post by dvgrn » November 3rd, 2015, 10:06 am

Scorbie wrote:@Sphenocorona Great job. I guess you would be sleeping by now, but it works real nice on 32bit linux. (Or, a 32bit ubuntu derivative at least.)
Works fine on a 64-bit Windows laptop as well, as I implied on the Demonoid thread where this all came up. Thanks again!

Sometimes when I paste a new puzzle in and add still lifes, then exit the program, the changes to the search tree apparently aren't saved to the .sod file. Other times it works fine. I haven't figured out if this is due to some kind of corruption in the backup file format. Maybe a further small adjustment is needed to complete the fix.

I vaguely remember running into this problem in SODGame 0.3, so it's nothing new. I think, but I'm not sure, that newly added keywords are sometimes actually visible in the save file, but the data is not in a form that can be read back out again. Further bulletins as events warrant.

User avatar
dvgrn
Moderator
Posts: 6523
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Seeds of Destruction: A Puzzle Game

Post by dvgrn » November 4th, 2015, 7:28 am

In another thread, Sphenocorona wrote:I'd like some input on this thought I had regarding SoD: should I add the honeyfarm constellation as a bait object? It's completely impractical in the current version, and yet they're one of the cheapest stable patterns to produce. Naturally, fixing the save game issues is important, but I had just been thinking that we could miss a cheaper method involving an HF.
It probably wouldn't hurt to have a honeyfarm as a bait object. On the other hand, they're fairly big and there won't always be room for them.

It might be worth writing an objects.txt file when the application closes, and reading from it at startup, similar to the savegame file. Then people could edit the file to add whatever objects they might want -- useful splitter/edge-shooter constellations or whatever.

It may not be obvious from the current GUI, but honeyfarms can be added quite easily already. Create a honeyfarm in Golly, with regular state-1 cells. Copy it to the clipboard, and in the SoDGame, roll the mouse on "Puzzle" to turn it to "Seed". Click on the "Seed" button and you can paste in any object you want to use as a bait.

This was a last-minute addition to the alpha before Paul stopped working on it, so it's not well advertised, and it doesn't work quite like other seeds -- there's no option to rotate or reorient or rephase an asymmetric bait, so you have to paste it in in the right orientation.

Other possible improvements include access to all four phases of gliders, or multiple phases of a pasted-in blinker or other oscillator seed. I'd rather the Demonoid cleanup circuits had only stable patterns in it, but it certainly seems to be true that blinkers are very cheap and efficient when you need to extend a reaction -- blocks are more implosive than explosive.

------------------------------------------

While I'm wishing, it would be really nice to have keyboard shortcuts to cycle through the baits, and to cycle through the different orientations/phases of a bait. That would make the SoDGame usable on a laptop, and would also make it much more efficient to test different baits while keeping the mouse centered in a key area.

The only thing better than that would be an option to try all possible baits automatically inside a small selected area, showing results in order of smallest final population... but that's a much bigger feature request!

Sphenocorona
Posts: 484
Joined: April 9th, 2013, 11:03 pm

Re: Seeds of Destruction: A Puzzle Game

Post by Sphenocorona » November 5th, 2015, 3:14 am

Version 0.5 will have honeyfarms as a built-in seed, so that they won't clog up the paste seed feature (I actually had seen that feature previously and then forgot about that when stating my wish to add HF as a seed). I've also reordered a couple seeds because the previous order put gliders in the middle of the list (I think putting them at the beginning is more logical) and hives were buried in the middle of the list which seemed pretty silly.

I also figured out the shorthand convention for the stills, and noticed that tubs are named incorrectly according to it; the format is [number of still lives][first letter of still life name][still life pop]; but the tub is called T3 by the program. I'm going to be changing that to T4.

These are still minor things; I do plan to fix the save game stuff before actually releasing 0.5.

There's another change I might make, that will actually change the game itself - two leveled quarantining. Some trivially legitimate solutions that can be constructed (placing two hives point-to-point for example) are prohibited by SoD's current quarantining method, but allowing for some regions to be partially quarantined (where stuff can be placed there, but only under certain conditions) would make these all possible.

Obviously, situations where a block that interacts with a conduit without having an effect won't be helped by this, but supporting that sounds like more of a nightmare than anything else currently suggested.

Sphenocorona
Posts: 484
Joined: April 9th, 2013, 11:03 pm

Re: Seeds of Destruction: A Puzzle Game

Post by Sphenocorona » November 8th, 2015, 4:20 am

Okay, this is really confusing. Nodes that disappear are saved, and the program seems to be able to read them despite not showing them. But upon closing, during the save routine, they aren't written to the savegame, and they are deleted forever.

But it's also possible for puzzles to only disappear the second or third time around, instead of the first. In these cases some other puzzle has already disappeared, and then those end up next on the list. Multiple puzzles can disappear at the same time, too, but if no puzzles disappear after a session then those ones will never disappear unless the save gets corrupted...

... I'm not sure I want to try and figure that out. Expect that whenever 0.5 comes out, it will not be compatible with your current savegames :( I'll only be releasing that once I'm sure that things save properly with whatever new savegame system I end up creating.

User avatar
dvgrn
Moderator
Posts: 6523
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Seeds of Destruction: A Puzzle Game

Post by dvgrn » November 8th, 2015, 10:27 am

Sphenocorona wrote:Okay, this is really confusing. Nodes that disappear are saved, and the program seems to be able to read them despite not showing them. But upon closing, during the save routine, they aren't written to the savegame, and they are deleted forever.
That matches the strange behavior I've seen. The problem is subtle enough that I haven't been able to come up with steps to reproduce the problem.

I don't think anyone will have a problem with an incompatible update -- can always keep an old version of the SoDGame around to open old savegame files. I hope you'll consider having the next savegame format be some editable format or other... Andrew Wade used YAML in his Gemini-building code, not that that's particularly relevant. The details don't matter much as long as it's possible to make careful adjustments with a text editor.

Sphenocorona
Posts: 484
Joined: April 9th, 2013, 11:03 pm

Re: Seeds of Destruction: A Puzzle Game

Post by Sphenocorona » January 30th, 2016, 10:08 pm

I decided to try diagnosing this again, and I've spotted a pattern among the puzzles that are deleted.

I set up 25 custom puzzles, closed, and reopened. Custom puzzles 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, and 25 remained. Did it again, only 1, 5, 9, 13, 17, 21, 25.

As it loads custom puzzles, every other puzzle is rejected. Not sure where this alternation comes from yet, nor why it only happens to custom puzzles.

Sphenocorona
Posts: 484
Joined: April 9th, 2013, 11:03 pm

Re: Seeds of Destruction: A Puzzle Game

Post by Sphenocorona » January 31st, 2016, 10:45 pm

Version 0.5 is finally out! Features include:
  • No more losing work due to disappearing puzzles!
  • Honeyfarms are included as a default seed
  • All phases of gliders for every direction are now included as seeds
There are many things I'd still like to change that I know everyone would appreciate, but I figured that prevention of data loss is an important enough change to warrant releasing ASAP.
SeedsOfDestruction.v0-5.zip
Includes an important fix regarding custom puzzles.
(103.99 KiB) Downloaded 892 times
The bug fix is fairly stupid and doesn't solve the actual root problem, but instead simply makes sure that the bug never kills any important save data. Unfortunately, this means that opening a 0.4 savefile will still result in data loss. After the first session everything will save and load safely. In order to avoid re-incurring data loss, do not open 0.5 saves with older versions of the software unless you want to lose 0.5 of your data.

User avatar
testitemqlstudop
Posts: 1336
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: Seeds of Destruction: A Puzzle Game

Post by testitemqlstudop » January 3rd, 2020, 3:27 am

I'm getting

Code: Select all

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.lang.String; ([Ljava.lang.Object; and [Ljava.lang.String; are in module java.base of loader 'bootstrap')
        at sphi.igblan.seedsOfDestruction.Nouns.<init>(Nouns.java:62)
        at sphi.igblan.seedsOfDestruction.PuzzleTree.<init>(PuzzleTree.java:115)
        at sphi.igblan.seedsOfDestruction.ui.Frame.<init>(Frame.java:38)
        at sphi.igblan.seedsOfDestruction.ui.Frame$4.run(Frame.java:307)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
when I run java -jar SeedsOfDestruction.v0-5.jar

How do I fix this?

User avatar
dvgrn
Moderator
Posts: 6523
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Seeds of Destruction: A Puzzle Game

Post by dvgrn » January 3rd, 2020, 8:43 am

testitemqlstudop wrote:
January 3rd, 2020, 3:27 am
I'm getting

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.lang.String; ([Ljava.lang.Object; and [Ljava.lang.String; are in module java.base of loader 'bootstrap')
at sphi.igblan.seedsOfDestruction.Nouns.<init>(Nouns.java:62)...


when I run java -jar SeedsOfDestruction.v0-5.jar

How do I fix this?
I don't really have any idea, except that possibly Seeds of Destruction is more OS-dependent than I thought. I'm guessing you're not running Windows, since usually in Windows you'd just double-click on the .jar file to open it?

In Windows 10 I'm not seeing any trouble when I invoke the application with your method:

Code: Select all

C:\Users\{username}\Desktop\SoD>java -jar SoDv0-5.jar

C:\Users\\{username}\Desktop\SoD>java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
What's your OS and Java version? Maybe we can find someone who is successfully running Seeds of Destruction on your OS, and look for differences. I'm seeing higher up that Scorbie got it to run on 32-bit Ubuntu, but not on a netbook.

The error looks like it's in the label-making part of the application, where it retrieves random nouns to label each tree node. That could be some kind of annoying OS-specific line-ending glitch, where for whatever reason Java is deciding to return an array of length 1 containing a string (i.e., an "Object") instead of a plain string. Or it could be something else entirely -- but it looks like it might be fixable with a simple cast. Maybe that's all that's wrong, or maybe there are fifty places in the code where the same complaint will show up once that one is fixed.

... I hope someone who has actually written a working Java program in the last decade can take over from this point -- I'm not in familiar territory here.

pcallahan
Posts: 490
Joined: April 26th, 2013, 1:04 pm

Re: Seeds of Destruction: A Puzzle Game

Post by pcallahan » January 3rd, 2020, 2:19 pm

dvgrn wrote:
January 3rd, 2020, 8:43 am
... I hope someone who has actually written a working Java program in the last decade can take over from this point -- I'm not in familiar territory here.
I have, though I don't think that fact is especially helpful. Just searching on the error string, I found this bug report, which looks relevant.
https://bugs.openjdk.java.net/browse/JDK-8225644

Though in this case, the bug is just that the error message is wrong. Maybe more searching on that string will uncover the cause of the error.

User avatar
PkmnQ
Posts: 939
Joined: September 24th, 2018, 6:35 am
Location: Server antipode

Re: Seeds of Destruction: A Puzzle Game

Post by PkmnQ » February 1st, 2020, 1:40 am

I couldn't find out how to change the seed, so I did the snark with 4 gliders first.

Code: Select all

#C Seeds of Destruction
#C "4 G fridge"
#C (Puzzle derived from Snark Reflector)
x = 49, y = 55, rule = LifeHistory
37.B$36.2B$35.3B$34.4B$33.4B$32.4B$31.4B$30.4B$29.4B$28.4B$
27.4B$26.4B$25.4B$24.4B$9.A13.4B$9.3A10.4B$12.A8.4B$11.2A7.
4B$11.5B3.4B$13.3B2.4B$3.2A7.9B$3.A8.8B$2A.A.B3.10B$A2.3AB.
2B2A7B$.2A2.BA3B2A7B$3.4A12B$3.A.2B3.7B.B2A$4.3AB2.7B.BA.A$
7.A4.4B5.A$2.5A5.4B5.2A$.A2.A8.4B$.2A11.4B$15.4B10.3A$16.4B
9.A$17.4B9.A$18.4B$19.4B$20.4B$21.4B11.3A$22.4B10.A$23.4B10.
A$15.3A6.4B$15.A9.4B$16.A9.4B$27.4B$28.4B$29.4B13.3A$30.4B
12.A$31.4B12.A$32.4B$33.4B$34.4B$35.3B$36.2B$37.B!
How to XSS:

Code: Select all

Function(‘a’+’lert(1)’)()

Ian07
Posts: 526
Joined: September 22nd, 2018, 8:48 am

Re: Seeds of Destruction: A Puzzle Game

Post by Ian07 » February 1st, 2020, 1:47 am

PkmnQ wrote:
February 1st, 2020, 1:40 am
I couldn't find out how to change the seed, so I did the snark with 4 gliders first.
Click on one of the puzzles you want to do on the right. For a custom one, there's a rather confusing process: copy pattern to clipboard from Golly, click "Sandbox" in SoD, hover over the "Puzzle" icon and scroll on the mouse wheel to change it to "Seed", click on that icon, and place down the pattern.

User avatar
PkmnQ
Posts: 939
Joined: September 24th, 2018, 6:35 am
Location: Server antipode

Re: Seeds of Destruction: A Puzzle Game

Post by PkmnQ » February 1st, 2020, 2:01 am

Ian07 wrote:
February 1st, 2020, 1:47 am
PkmnQ wrote:
February 1st, 2020, 1:40 am
I couldn't find out how to change the seed, so I did the snark with 4 gliders first.
Click on one of the puzzles you want to do on the right. For a custom one, there's a rather confusing process: copy pattern to clipboard from Golly, click "Sandbox" in SoD, hover over the "Puzzle" icon and scroll on the mouse wheel to change it to "Seed", click on that icon, and place down the pattern.
I meant if you wanted to change the glider to a boat or something, and I already found out.
How to XSS:

Code: Select all

Function(‘a’+’lert(1)’)()

User avatar
dvgrn
Moderator
Posts: 6523
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Seeds of Destruction: A Puzzle Game

Post by dvgrn » February 1st, 2020, 7:54 am

Ian07 wrote:
February 1st, 2020, 1:47 am
Click on one of the puzzles you want to do on the right. For a custom one, there's a rather confusing process: copy pattern to clipboard from Golly, click "Sandbox" in SoD, hover over the "Puzzle" icon and scroll on the mouse wheel to change it to "Seed", click on that icon, and place down the pattern.
Just for the record, before Sphenocorona fixed it there was a bug that prevented the creation of new puzzles, and the above was the workaround.

However, Seeds of Destruction 0.5 is back in business in the new-puzzle department, so now the process is just slightly easier: copy pattern to clipboard from Golly, then click the "Puzzle" icon in SoD (without changing it to "Seed"). "Seed" is more for when you want to add custom objects to a base puzzle pattern.

YakForger
Posts: 7
Joined: February 21st, 2020, 11:38 am

Re: Seeds of Destruction: A Puzzle Game

Post by YakForger » February 21st, 2020, 1:45 pm

That's awesome to see that the project is still having updates!

By the way, it works fine on Ubuntu 18.04, I'm still to test it on the Windows laptop I'm using right now though.

Post Reply