Discuss Scratch
- WooHooBoy
-
1000+ posts
"Hive" Strategy?
https://en.wikipedia.org/wiki/Lights_Out_(game)I didn't understand any of that answer, so I suppose I can figure it out myself! By the looks of things, Hive is based on ‘Lights Out’ -
EDIT: That wikipedia page also has some information for solving ‘Lights Out’ using an algorithm, so if you base your algorithm on that you'll probably find a nice way to solve it.
Also, a nice way to make it harder is to increase the grid size
EDIT 2: Oh look here! I found a solution! http://math.stackexchange.com/questions/11091/lights-out-game-on-hexagonal-grid

- DigiTechs
-
500+ posts
"Hive" Strategy?
https://en.wikipedia.org/wiki/Lights_Out_(game)I didn't understand any of that answer, so I suppose I can figure it out myself! By the looks of things, Hive is based on ‘Lights Out’ -
EDIT: That wikipedia page also has some information for solving ‘Lights Out’ using an algorithm, so if you base your algorithm on that you'll probably find a nice way to solve it.
Also, a nice way to make it harder is to increase the grid size
EDIT 2: Oh look here! I found a solution! http://math.stackexchange.com/questions/11091/lights-out-game-on-hexagonal-grid
Haha. It's still pretty awesome, though
- MegaApuTurkUltra
-
1000+ posts
"Hive" Strategy?
Ah that's a good point. So you have to find moves that hit each block the same (odd) number of times.Doing this is pointless, though.Lol This game is like a nightmareBut I think you're allowed to click in the same place multiple times right? So wouldn't it be 19P8? 19 choose 8 = 75582
If someone made a JS implementation, this could be brute forced easily
In another note any moves you make can be done in any order and give the same result.
- WooHooBoy
-
1000+ posts
"Hive" Strategy?
I guess the next question is to find out how many 8-flip combinations there are?Ah that's a good point. So you have to find moves that hit each block the same (odd) number of times.Doing this is pointless, though.Lol This game is like a nightmareBut I think you're allowed to click in the same place multiple times right? So wouldn't it be 19P8? 19 choose 8 = 75582
If someone made a JS implementation, this could be brute forced easily
In another note any moves you make can be done in any order and give the same result.
Then try to find a method of coming up with optimal solves on bigger grids.
- Thepuzzlegame
-
1000+ posts
"Hive" Strategy?
I think I got lucky or something, cause it took me a long time to solve it again.I've tried at least 10-20 times, and only completed it once. Took me 20 moves on my first try
Hmm, so an algorithm which solves this in the least number of moves possible…that should be possible.
It took 80 moves.
- TheMonsterOfTheDeep
-
1000+ posts
"Hive" Strategy?
My first winning run was 14 tries. I really like the game Lights Out and played a similar game by Bart Bonte.
I would definitely rather brute force this than math it out.
I would definitely rather brute force this than math it out.

- PullJosh
-
1000+ posts
"Hive" Strategy?
So, I know I said I wasn't going to brute force it, but… Y'know. :3
Eight, as long as my program is correct, is the best possible score. However, there are a couple of ways to get eight. I've numbed each tile, as shown below:

Each line shows one solution, listing the tiles which need to be clicked:
The code I used is available here, and it would be great if somebody could check it to make sure it's accurate. I don't want to miss any!
Eight, as long as my program is correct, is the best possible score. However, there are a couple of ways to get eight. I've numbed each tile, as shown below:

Each line shows one solution, listing the tiles which need to be clicked:
1, 2, 5, 8, 11, 14, 17, 18
1, 3, 4, 5, 11, 12, 14, 16
1, 3, 6, 7, 8, 9, 13, 15
2, 3, 6, 9, 12, 15, 18, 19
4, 6, 8, 9, 15, 16, 17, 19
5, 7, 11, 12, 13, 14, 17, 19
The code I used is available here, and it would be great if somebody could check it to make sure it's accurate. I don't want to miss any!

- Dylan5797
-
1000+ posts
"Hive" Strategy?
Nice. So, I know I said I wasn't going to brute force it, but… Y'know. :3
Eight, as long as my program is correct, is the best possible score. However, there are a couple of ways to get eight. I've numbed each tile, as shown below:
Each line shows one solution, listing the tiles which need to be clicked:1, 2, 5, 8, 11, 14, 17, 18
1, 3, 4, 5, 11, 12, 14, 16
1, 3, 6, 7, 8, 9, 13, 15
2, 3, 6, 9, 12, 15, 18, 19
4, 6, 8, 9, 15, 16, 17, 19
5, 7, 11, 12, 13, 14, 17, 19
The code I used is available here, and it would be great if somebody could check it to make sure it's accurate. I don't want to miss any!
- -Io-
-
1000+ posts
"Hive" Strategy?
They're all your original 8 move solution rotated e.e So, I know I said I wasn't going to brute force it, but… Y'know. :3
Eight, as long as my program is correct, is the best possible score. However, there are a couple of ways to get eight. I've numbed each tile, as shown below:
Each line shows one solution, listing the tiles which need to be clicked:1, 2, 5, 8, 11, 14, 17, 18
1, 3, 4, 5, 11, 12, 14, 16
1, 3, 6, 7, 8, 9, 13, 15
2, 3, 6, 9, 12, 15, 18, 19
4, 6, 8, 9, 15, 16, 17, 19
5, 7, 11, 12, 13, 14, 17, 19
The code I used is available here, and it would be great if somebody could check it to make sure it's accurate. I don't want to miss any!
- BookOwl
-
1000+ posts
"Hive" Strategy?
It seems that the order that you make your moves doesn't matter.They're all your original 8 move solution rotated e.e So, I know I said I wasn't going to brute force it, but… Y'know. :3
Eight, as long as my program is correct, is the best possible score. However, there are a couple of ways to get eight. I've numbed each tile, as shown below:
Each line shows one solution, listing the tiles which need to be clicked:1, 2, 5, 8, 11, 14, 17, 18
1, 3, 4, 5, 11, 12, 14, 16
1, 3, 6, 7, 8, 9, 13, 15
2, 3, 6, 9, 12, 15, 18, 19
4, 6, 8, 9, 15, 16, 17, 19
5, 7, 11, 12, 13, 14, 17, 19
The code I used is available here, and it would be great if somebody could check it to make sure it's accurate. I don't want to miss any!
Also, I've ported Hive to python. You can find it on Github.
Last edited by BookOwl (Jan. 21, 2016 19:20:34)
- PullJosh
-
1000+ posts
"Hive" Strategy?
Of course not! Although I suppose I don't have a great way of explaining why. Just think about it for a little while and it should make some intuitive sense. It seems that the order that you make your moves doesn't matter.

Interesting… I hadn't noticed! So as long as my code is correct, that means there is only one unique 8-click solution. They're all your original 8 move solution rotated e.e
- IronBit_Studios
-
1000+ posts
"Hive" Strategy?
It's impossible to get under 8, if I did my math right.
- wizzwizz7
-
500+ posts
"Hive" Strategy?
Ha! If I remember right, the fewest you need to do is 6. I wonder if we could make a) a computer program that solves stuff like that in the minimum moves, ideally on Scratch b) a mathematical proof as to why the minimum is six. DigiTechs is right, though; I'm going to look on there and perhaps replicate the algorithm in Scratch.
- Zro716
-
1000+ posts
"Hive" Strategy?
For the record, I find it funner to make interesting patterns than to finish the game.
- PullJosh
-
1000+ posts
"Hive" Strategy?
I find it For the record, I find it funner to make interesting patterns than to finish the game.more fun to correct grammar than to actually contribute to the discussion.
- PullJosh
-
1000+ posts
"Hive" Strategy?
Hmm… My code gave no solutions better than 8. I hope I didn't do anything wrong! Ha! If I remember right, the fewest you need to do is 6. I wonder if we could make a) a computer program that solves stuff like that in the minimum moves, ideally on Scratch b) a mathematical proof as to why the minimum is six. DigiTechs is right, though; I'm going to look on there and perhaps replicate the algorithm in Scratch.
(Glad you're into the maths as well, that's the bit that I'm really interested in.)
- wizzwizz7
-
500+ posts
"Hive" Strategy?
ooh rektI find it For the record, I find it funner to make interesting patterns than to finish the game.more fun to correct grammar than to actually contribute to the discussion.
- wizzwizz7
-
500+ posts
"Hive" Strategy?
Hmm… I can't remember how I did it. I'll have a go at it some time, but I think somebody demonstrated a similar method earler.Hmm… My code gave no solutions better than 8. I hope I didn't do anything wrong! Ha! If I remember right, the fewest you need to do is 6. I wonder if we could make a) a computer program that solves stuff like that in the minimum moves, ideally on Scratch b) a mathematical proof as to why the minimum is six. DigiTechs is right, though; I'm going to look on there and perhaps replicate the algorithm in Scratch.
(Glad you're into the maths as well, that's the bit that I'm really interested in.)
- wizzwizz7
-
500+ posts
"Hive" Strategy?
ARGH!!! I thought I did it in six, but it was eight moves. Sorry for confusion, everyone.Hmm… I can't remember how I did it. I'll have a go at it some time, but I think somebody demonstrated a similar method earler.Hmm… My code gave no solutions better than 8. I hope I didn't do anything wrong! Ha! If I remember right, the fewest you need to do is 6. I wonder if we could make a) a computer program that solves stuff like that in the minimum moves, ideally on Scratch b) a mathematical proof as to why the minimum is six. DigiTechs is right, though; I'm going to look on there and perhaps replicate the algorithm in Scratch.
(Glad you're into the maths as well, that's the bit that I'm really interested in.)

- scratchisthebest
-
1000+ posts
"Hive" Strategy?
Here's a 7-wide9-wide because I'm a dum dum version: https://scratch.mit.edu/projects/95249382
Last edited by scratchisthebest (Jan. 24, 2016 03:38:00)