Join us on Discord!
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.
  • Calculators owned: TI-83+, TI-84+


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.
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
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.
  • Calculators owned: TI-83+, TI-84+


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?
  • Calculators owned: TI-83+, TI-84+


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

  • Calculators owned: TI-84+
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]?
  • Calculators owned: TI-83+, TI-84+


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.
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
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.
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
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

Dream of Omnimaga

This looks pretty interesting Hayleia. I can't wait to try the final result when you will submit it. :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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

Dream of Omnimaga

Ooh, random levels seems cool. Are they guaranteed to be solvable? How much time does it take to generate them? :D
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal