Using Python to solve flood-fill puzzles (Kami and Kami 2 games)

  Рет қаралды 5,384

Games Computers Play

Games Computers Play

Күн бұрын

I've written a python program to solve puzzles in flood-fill games Kami and Kami 2.
Source code: drive.google.c...
Kami on Steam: store.steampow...
Kami 2 in appstore: apps.apple.com...
Kami 2 in Google Play: play.google.co...
------------------------------
Ocean by Ehrling / ehrling
Free Download / Stream: bit.ly/ocean-e...
Music promoted by Audio Library • Ocean - Ehrling (No Co...
------------------------------

Пікірлер: 14
@danfountgames
@danfountgames 4 жыл бұрын
Thanks for destroying our game with python! Really glad you enjoyed my puzzles! I tried to make a 'solver' inside KAMI 2 for drawing puzzles, but it looks like you did a better job.
@brockobama257
@brockobama257 10 ай бұрын
I’m just glad I’m not the only dev who saw your game and thought “I’m gonna fuck this thing up”
@cloudykj1484
@cloudykj1484 4 жыл бұрын
You look like a absolute professional
@b0nce
@b0nce 3 жыл бұрын
1) programmer with great skill 2) solves interesting puzzles 3) answers cool statistics/probability questions 4) using python 5) while having exact right amount of humor in videos 6) which are approximately 20 minutes long 7) and even having notepad++ AM I IN HEAVEN?! BEST EVER YT CONTENT IS FINALLY FOUND?! I already watching your channel for 2 hours non-stop instead of sleeping and don't want to stop
@b0nce
@b0nce 3 жыл бұрын
I also love how "just throw some computation in here" used only when it needed (as all great engineers do), so proportion of math and logic/computation is perfect
@GamesComputersPlay
@GamesComputersPlay 3 жыл бұрын
Thanks, I really appreciate it.
@phantom9214-u6r
@phantom9214-u6r 3 жыл бұрын
I know this is an old video, but I wanted to comment my ideas on how to solve this more efficiently than brute force just in case anyone else wants to tackle this. I'd recommend it to CS students as a good exercise, but skip to where you have a graph already and you're trying to design an algorithm to work on the graph, not the game itself. Students in data structures should especially try this. From what I can tell, getting it into a graph format is by far the hardest part. If you've done that, most of the work is done. The graph is nodes (areas) of a single color linked to other nodes (areas) of different colors (the ones they border). Then, you define painting areas as joining nodes, such that when you change the color of an area (a node on the graph), you then check to see if it has the same color as any of its bordering nodes (areas). If it does, then they join together, inheriting all of their edges bordering other nodes and putting it into one node. You then check this repeatedly until you've made sure you've fused all regions of the same color that are bordering that node. To find the most efficient method, go through each node and find the one which has the most distinct neighbors of the same color. Then change that node to that color. That way, you eliminate the most amount of nodes possible in a single click. Repeat this until you've reduced it to a single point. That's my quick and untested theory on the exercise, hopefully I did pretty well. I'd say a brute force and pruning method is actually harder to make, and I'd recommend anyone trying the challenge attempt to make both just for the practice. Bravo to anyone who does and I hope everyone learns a lot.
@GamesComputersPlay
@GamesComputersPlay 3 жыл бұрын
Hmmm... I see where you are going with this, but I don't think it will be that easy. I sort of implemented this idea, but in a slightly different way: - we have A LOT of options to go through when we check all nodes and all colors. - after generating all those resulting graphs I select for the next round those, that have least amount of nodes. Which I think is the equivalent of what you are suggesting. I also tried minimal number of links as another factor. What I found out is that logic does not always lead to the shortest solution (greedy algorithms is not always the best). I think I even mention it in the video on which level it breaks. In my case I added such parameters as minimumal number of colors, and minimum number of nodes of the single color - that helped. And even so - I had to keep enough option in, as sometimes 2nd or 3rd best node nuber resulted in the solution. But overall - great programming excersize. I can also recommend the game "Flood it" - similar puzzles, but way less headache with reading the picture.
@brockobama257
@brockobama257 10 ай бұрын
Lowkey reading the data is not hard with agglomerative clustering on the color swaths, kmeans on the game board, and some funky grid definitions for the game board. The pattern tiles are a bitch tho. My only pruning idea not mentioned so far was to exclude paths where num_colors - 1 > num_moves since any move will remove at most one color It really doesn’t do shit for a speed up.
@MonkeySimius
@MonkeySimius 2 жыл бұрын
I used to play this game on Paint back in the mid 90s. I mean I had to make my own stupid pictures, but still.
@joshuasims5421
@joshuasims5421 3 жыл бұрын
The puzzle on the right at 7:56 is where Kami 2 beat me…
@GamesComputersPlay
@GamesComputersPlay 3 жыл бұрын
It is still really impressive. I was miles behind when I gave up. This one though almost made me give up with the solver too - but luckily I found a workaround.
@decodedbunny101
@decodedbunny101 4 жыл бұрын
Wow
@decodedbunny101
@decodedbunny101 4 жыл бұрын
What is this
Sudoku Solver in Python (using 10 different solving strategies)
18:22
Games Computers Play
Рет қаралды 38 М.
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН
Every team from the Bracket Buster! Who ya got? 😏
0:53
FailArmy Shorts
Рет қаралды 13 МЛН
УЛИЧНЫЕ МУЗЫКАНТЫ В СОЧИ 🤘🏻
0:33
РОК ЗАВОД
Рет қаралды 7 МЛН
Your Remote Desktop SUCKS!! Try this instead (FREE + Open Source)
22:30
What if you just keep zooming in?
21:29
Veritasium
Рет қаралды 7 МЛН
Python Bot Plays Connect Four (using Minimax and some heuristics)
20:31
Games Computers Play
Рет қаралды 17 М.
Python script beats Minesweeper in seconds (30+% success on expert)
13:22
Games Computers Play
Рет қаралды 29 М.
How do non-euclidean games work? | Bitwise
14:19
DigiDigger
Рет қаралды 2,5 МЛН
Bot destroys Tetris (or at least plays better than an average human)
19:26
Games Computers Play
Рет қаралды 14 М.
Terence Tao on how we measure the cosmos | Part 1
28:33
3Blue1Brown
Рет қаралды 570 М.
Simulating Wordle: in search of the perfect strategy
13:01
Games Computers Play
Рет қаралды 29 М.