Page 1 of 10

Puzzle Mode

PostPosted: 20 Mar 2017, 21:44
by friarsol
So i had some free time this weekend to work on a project that had been on my to do list forever. It's not 100% done but it's definitely at the point where i can commit an initial version soonish.

If anyone remembers those old puzzles from inside duelist magazine, it's basically that ability baked into forge. If anyone has a good compilation of puzzles and/ or they are willing to transcribe puzzles please let me know

Re: Puzzle Mode

PostPosted: 21 Mar 2017, 08:16
by Indigo Dragon
Coincidentally, "Possibility Storm" just started up, posting puzzles (hopefully) weekly.
You can check them out here https://www.patreon.com/mtgpuzzles.
Their subreddit also has a couple more https://www.reddit.com/r/mtgpuzzles/.

Re: Puzzle Mode

PostPosted: 22 Mar 2017, 08:05
by Agetian
Ah, this is really great! :) I've been willing to do something like that for quite a while by now, but sadly couldn't find the time to get to the implementation stage. Glad to hear you're doing it! I'll see if I can contribute after the initial commit in any meaningful way in my current time frame. :) Best of luck!

- Agetian

Re: Puzzle Mode

PostPosted: 31 Mar 2017, 03:03
by Bog Wraith
I refer you to something I did here 6 years ago:


viewtopic.php?f=77&t=3488


viewtopic.php?f=62&t=3287


viewforum.php?f=79


viewforum.php?f=77


Let me know what you think, Sol.

Re: Puzzle Mode

PostPosted: 01 Apr 2017, 01:35
by friarsol
Oh nice. The ultimate goal is to have a "Solve" Mode and a "Create" Mode. To start only the Solve mode will be available, but eventually I'll pull together the other Mode where basically you get to set the current board state, and the goal of the puzzle, disabling all of the "Magic engine" aspects of Forge. And letting you have a "toolbar" of sorts, that is basically the same as what are dev tools do.

I'm currently using the Game State Load/Save to save out states then drop them into a Puzzle file.

Re: Puzzle Mode

PostPosted: 01 Apr 2017, 02:38
by Bog Wraith
Ok, I look forward to this very much.

I moved recently so I'm not sure where my Duelist Magazines are, but I have every one of them. Somewhere, I also have a book that Rosewater put out collecting these puzzles. They are of course based on old sets from the past, but they are awesome still to this day.

Let me know if you need any of these Sol, and I will hunt for them when I can.

Gathering Magic has been doing puzzles from more current sets as well as from some in the past. They have been doing this for a number of years now so there are a ton to choose from.

http://www.gatheringmagic.com/category/puzzles/

Re: Puzzle Mode

PostPosted: 01 Apr 2017, 17:04
by Xitax
Would like to help with puzzle compilation when this is testable :)

Re: Puzzle Mode

PostPosted: 07 Apr 2017, 04:20
by bink
Don't know how I missed this. Thank you for pointing me here after I made a post on the same subject. If I can help in anyway please let me know. A bunch of puzzles can be found here.
http://www.gatheringmagic.com/category/puzzles/

Re: Puzzle Mode

PostPosted: 07 Apr 2017, 08:55
by Voda
Is there any way we can start working on some Puzzles' implementation ? Like, is setting up some game states all we can do at the moment or do you think of any other work we could do in advance ?

Also, did you think of how we are going to share solutions with puzzles ?

Re: Puzzle Mode

PostPosted: 08 Apr 2017, 15:21
by friarsol
Right now the puzzles are just enhanced Game State files. I'll continue to improve to game state, since right now there's a bunch of limiting factors, trying to keep it as backwards compatible as possible..

Here is one of my test puzzles:

Code: Select all
[metadata]
Name:Possibility Storm #1
URL:https://i.redd.it/wws1h03gy7ky.png
Goal:Win
Turns:1
[state]
ActivePlayer=Human
ActivePhase=Main1
HumanLife=20
AILife=9
HumanPlay=Key to the City; Ravenous Intruder; Ruinous Gremlin; Island; Island; Island; Island; Island; Mountain; Mountain
HumanHand=Welcome to the Fold; Chilling Grasp; Flame Lash; Confirm Suspicions
AIPlay=Workshop Assistant; Thriving Ibex

Re: Puzzle Mode

PostPosted: 08 Apr 2017, 18:29
by bink
I just became a patron of Possibility Storms puzzles.

I'm actually working on puzzle 2 for Forge. So far I have found the easiest way is to make a deck with all the cards needed for the puzzle in it. Start a new game with both players set to human, both playing the same deck with the puzzle cards and have deck conformance turned off. Then use dev mode to get everything in the right place and ready for our first main phase. Finally save the state and try to solve the puzzle.

So far I have found this the easiest way. Previously I was tutoring for every card with both players having a deck of only basic land. It got the job done but took forever. Sol I hope you find away to get Puzzle mode integrated into Forge. It would be amazing. Unfortunately I do not posses the skill set to complete such a task.

Re: Puzzle Mode

PostPosted: 08 Apr 2017, 20:46
by Xitax
friarsol wrote:Right now the puzzles are just enhanced Game State files. I'll continue to improve to game state, since right now there's a bunch of limiting factors, trying to keep it as backwards compatible as possible..
If you can figure out a way to add counters or attach permanents it would be at least 90% of the way there. I haven't seen many puzzles where the goal wasn't to win and the player wasn't already on the ropes, so normal Forge play works for those.

Re: Puzzle Mode

PostPosted: 08 Apr 2017, 21:28
by friarsol
bink wrote:I just became a patron of Possibility Storms puzzles.

I'm actually working on puzzle 2 for Forge. So far I have found the easiest way is to make a deck with all the cards needed for the puzzle in it. Start a new game with both players set to human, both playing the same deck with the puzzle cards and have deck conformance turned off. Then use dev mode to get everything in the right place and ready for our first main phase. Finally save the state and try to solve the puzzle.

So far I have found this the easiest way. Previously I was tutoring for every card with both players having a deck of only basic land. It got the job done but took forever. Sol I hope you find away to get Puzzle mode integrated into Forge. It would be amazing. Unfortunately I do not posses the skill set to complete such a task.
Yea, I actually have puzzle #2 scripted too, but there was some weirdness with the Planeswalker counters. Hadn't gotten time to fix it yet.

Depending on the contents, it's probably fastest to just handtype the game state file, then build a deck then do all the dev tools shenanigans. As I mentioned, the goal is to have a create mode, that doesn't run the actual engine, let's you set whatever turn you need. And let's you go find whatever cards you want and add them to whatever zone you need. I committed what I had so it'll be in the next snapshot build, but definitely consider it still a work in progress. Create mode isn't started at all yet, but solve mode should work.

Xitax wrote:If you can figure out a way to add counters or attach permanents it would be at least 90% of the way there. I haven't seen many puzzles where the goal wasn't to win and the player wasn't already on the ropes, so normal Forge play works for those.
Adding counters to permanents supposedly was already there, I made it bit more generic so it might work for players too. Attaching permanents is definitely tricky.

If there's limitations to what the AI should be doing, I might add certain cards to the puzzle so it can't happen "AI won't activate XYZ ability" etc.

Re: Puzzle Mode

PostPosted: 09 Apr 2017, 01:11
by bink
I just discovered when dumping game a state if both players are set to human a java script error occurs. So much for making easy states. Looks like you method is better Sol.

Re: Puzzle Mode

PostPosted: 09 Apr 2017, 02:13
by friarsol
bink wrote:I just discovered when dumping game a state if both players are set to human a java script error occurs. So much for making easy states. Looks like you method is better Sol.
Yea Game States are very restrictive unfortunately. It's not that big of a deal to make one player an AI and still use the dev tools, but you have to be careful as you do it.