September 26, 2020, 12:25:19 am

The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

[4x3 contest] [Axe] (No idea for a name :P)

Started by Hayleia, May 01, 2015, 09:55:25 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CKH4

12^4-2. I don't think that that number is right because of unsolvable ones but it should be right including unsolvable ones.


matrefeytontias

Well I didn't account for the unsolvable ones. As CKH4 said, I only did 4^12 - 2 to account for the full-white and full-black puzzles.
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

CKH4

I don't see a way to account for the unsolvable ones short of counting them by hand. We may be able to approximate them by finding the median of 4^6 and then counting the number of impossible ones from 4^5 to 4^7 and then multiplying by ^6. I'm pretty sure that I'm the only one that understands what I'm saying but if you understand maybe you could try to explain it better.


Hayleia

Quote from: matrefeytontias on May 05, 2015, 02:31:36 pm
Well I didn't account for the unsolvable ones. As CKH4 said, I only did 4^12 - 2 to account for the full-white and full-black puzzles.
Well I agree that 4^12-2 should be all puzzles except all black and all white but the calculation you posted on the other page was more 12^4-2, so I got confused and thought your number (which was far less than 4^12, which I could tell just by reading it since I know 4^10 by heart) was the number of solvable problems :P

Quote from: CKH4 on May 05, 2015, 02:41:19 pm
I don't see a way to account for the unsolvable ones short of counting them by hand. We may be able to approximate them by finding the median of 4^6 and then counting the number of impossible ones from 4^5 to 4^7 and then multiplying by ^6. I'm pretty sure that I'm the only one that understands what I'm saying but if you understand maybe you could try to explain it better.
Nope, I didn't get it :P

Also, here's where the development is at.
The main program is now 809 bytes and has a black blinking cursor on your position.
The editor is a lot bigger and allows you to create/edit an appvar and edit the only level it contains. It needs to support adding/deleting levels, plus probably some other features.

CKH4

Nice, the size is quite impressive. How do you manage levels though? A string or some Data()s?


Hayleia

Well for now it's just a stupid [], but they will be stored in appvars next, to allow people to share their levels :)

Snektron

Legends say if you spam more than DJ Omnimaga, you will become a walrus...


CKH4

Oh that's cool. How much data does each one take so far and is would a correct level format be:
[4,2,3,1]
[2,2,3,2]
[1,3,4,2]?


matrefeytontias

Well since it's 12 cells with 4 possible states each, it's indeed 12^4 possibilities. I can't really see how one would determine if a particular configuration is solvable or not though (by non-algorithmic means of course).

EDIT: just realized that I wrote 4^12 above :P that was a typo.
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

Hayleia

Quote from: CKH4 on May 05, 2015, 09:03:36 pm
Oh that's cool. How much data does each one take so far and is would a correct level format be:
[4,2,3,1]
[2,2,3,2]
[1,3,4,2]?
Remove the commas and substract 1 to all your numbers and you're good :)
I read/write nibbles but I could compress even more since each number is on 2 bits, not 4. But I kept 4 in case I ever add support for more shades than 4 (bullsheep, I'm just too lazy to write code to read/write 2 bits :P (not that it's hard, just that levels are already small enough and probably don't need more compression, and I'd like my code not to be too large)).

Quote from: matrefeytontias on May 05, 2015, 09:55:53 pm
Well since it's 12 cells with 4 possible states each, it's indeed 12^4 possibilities.
Well ok for the first part of the sentence, but doesn't that make 4^12 possibilities ? I mean, 1 cell with 4 possible states makes 4^1 possibilities, not 1^4. So replace 1 with 12 and you get 4^12, not 12^4 :P

Quote from: matrefeytontias on May 05, 2015, 09:55:53 pm
I can't really see how one would determine if a particular configuration is solvable or not though (by non-algorithmic means of course).
Yeah, I guess this could be calculated using a recursion or something, but I guess that's not really useful.
But since I didn't recognize 4^12 in your first post, I actually thought you did that recursion or found something else to calculate easily, that's why I asked in the first place :P

matrefeytontias

Well I can't math right now, so we'll talk about that later x)

Also, knowing how to determine if a level is solvable or not would permit you to implement a random level generator, which could be a nice addition to the game.
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

DJ Omnimaga

This looks pretty interesting Hayleia. I can't wait to try the final result when you will submit it. :)

Hayleia

Quote from: matrefeytontias on May 05, 2015, 10:42:37 pm
implement a random level generator, which could be a nice addition to the game.
Well that's actually a very good idea, especially since I can't make a decent level selection menu for the contest release (so custom levels would be supported for the final game but not for the contest release) so that would be a nice plus in my opinion :D

Quote from: DJ Omnimaga on May 05, 2015, 11:33:05 pm
This looks pretty interesting Hayleia. I can't wait to try the final result when you will submit it. :)
Thanks :)

Hayleia

The random level generator is implemented (since yesterday in fact)... and I also wrote a seedable random number generator :D
This way, I don't even have to create levels for that game, I just have to put different seeds to the random number generator and different parameters to the level generator to have as many levels as I want in the game :P

DJ Omnimaga

Ooh, random levels seems cool. Are they guaranteed to be solvable? How much time does it take to generate them? :D

Powered by EzPortal