i think knockout would be super interesting, it is the main game i think of as a "gamepigeon original" although it would definitely be more complicated to implement since there are wayyy more than 4 possible moves
Hello! I am ItsAsShrimpleAsThat, the person who created the engine you tested yours against. I was originally going to make a video about mine, but now that this video exists (with an engine that works nearly identical to mine), so I probably won't anymore. I would love to see the code open sourced so I can compare the differences to see exactly what is making it take 3 hours to search to a depth of 18. Great video though! Hope to see more great work in the future!
I have never heard of that, gonna spend 30 minutes at work reading about it lmao Edit: I just read up on how it works and that’s super interesting. Never thought about that before. Thank you!
There's a strategy to these type of games that min-max doesn't notice at lower depths. The key is that "score" doesn't matter at all, control of the board does. You want to grow towards the middle as quickly as possible. From there, you want to grow to the corners as quickly as possible (not the starting corners, but the other two). This cuts the opponent off from most of the board making it impossible for them to gain a majority of squares. You can do this in three stages: first use A* to travel towards the middle as quickly as possible. Second use min-max to travel towards the corners while maximizing "control" of the board (i.e. squares that are closer to you than to your opponent). Third, once you've expanded as far as possible towards the corners, use min-max to optimize control of squares that aren't totally blocked-off by you or the opponent. Not strictly the most optimal strategy, but it runs faster on larger boards or when more colors are involved. Genetic algorithms may be able to converge on a better strategy given enough training.
Interesting! I thought about a similar idea but I wanted to try and solve the game, so if I solved it then it didn’t matter. However my code was just too slow to solve it and maybe something like this would have been useful
You could probably modify this AI very easily by weighing the squares by how strategically valuable they are. I.e. score for player A is the sum of [distance from A corner] for all squares controlled by A. Similar for B; And then as usual the advantage is the difference of the scores. My initial thought would have been to use the distance from the starting square as the weight, specifically Manhattan distance. But that would weigh something along the edge the same as something in the center (and Euclidian distance is even worse). You could also use [distance from one of the edges adjacent to your start] times [distance from the other edge], or for short X*Y, but that would place basically zero weight on the edge positions, unless you do (A+7)*(B+7)-7² or something like that, where you can tweak the exact value you add. If you simplify this, you see that it's actually A*B +(7A +7B), or a small amount of the multiplied weight with a larger amount of the Manhattan distance weight.
I saw something similar for chess where they used like a hashmap to store where each piece had a value associated with a square, center tending to be the best. Would be interesting and probably work
In this case I would be very surprised if it mattered, board control is already being considered because of how deep it is searching, if the ai searching a branch where it fails to properly handle board control then it will score less and be less favored.
@@tomtravis858 Yes, board control doesn't _really_ matter, *if* you just look far enough ahead. But you can say the same about the score; *if* you look far enough ahead then you only need to know who holds more area, not _how much_ more. The differences between score functions _theoretically_ don't matter, but they come into effect if you can't look enough moves ahead to cover the whole game, or if you do A-B pruning. If the score more accurately reflects who is going to win, then you can get away with looking less moves ahead, and you can prune more aggressively, speeding up the AI. Then again, the score functions should agree at the point where the game is finished. Which the score function that I proposed doesn't. If there's a single center square and 2 or more edge squares available, my AI would _ALWAYS_ prefer the center square, even in the end game. You probably need to interpolate between a position- and control-quantifying function and the pure score based on how many squares are still up for grabs.
how more advanced game solver programs work is instead of using an arbitrary heuristic like your pieces vs their pieces they do this: First the make it with min max with an arbitrary heuristic and simulate a ton of games and moves do every game to completion but they store every move very carefully then they use that as training data to train a machine learning model to be able to predict which side will win then they use min max algorithm again but instead of an arbitrary heuristic, they use the ai model. With a better heuristic, a better game solver, sooo they do a lot more simulating and genereating more new better training data they then make a new ML model to predict the winner from that then use that to make more training data to make anouther model and on and on and on then eventually you have something really really good
Good work! My only qualm with the video is that it doesn’t last longer. You have a sensual voice! I repeated this video many times last night for the sake of the algorithm and also my pleasure.
Great video! Although youtube algo scaring me, i literally just did this like last month. Give a shot into move ordering and transposition tables to speed things up :) theres a LOT that can be done!
Right now it feels like there are large chunks of highly edited and large chunks of completely unedited parts of the video. The ending was extremely abrupt and felt like you rushed to finishing the video. With just some practice on creating a winning formula your content is bound to succeed. Absolutely loved the video but I think there is a ton of Enhancement that can still be made. Wishing you the best man
Do you think you could optimize it by measuring the area within the border instead of the area currently claimed? For example, at 5:00 or 5:01 (after claiming cyan then green), there is an area of 7 blocks in the lower right that you don't have to worry about your opponent claiming
Yes! I thought about this but I was trying to get my code to see far enough out that it wouldn’t matter. I wanted it to realize it was suboptimal by just scanning the entire game possibilities. However it was too slow, so something like what you suggest probably would improve its strength a bit
Did you implement alpha beta pruning in your bot? There is no need to continue down the worst options for more than a couple moves. This would drastically minimize the computing time, because you're not checking exponentially many cases anymore.
I did! I started editing/explaining alpha beta pruning in the video and it just was too much for what I wanted the video to be. I didn’t want to lose people from seeing the end result by explaining a topic that could be a bit confusing
wdym? Why don't I have android? My phone was a gift that's why. As to why game pigeon is not on android, it probably has to do with how imessage is different than a standard text
This shouldn't have been ended at this step; green doesn't quite have half the board yet. I'd guess you're counting all pieces of the active colour rather than only those in the filled group, which could affect strategy
@@JoeCoup1 fair enough; IMO for a proper AI it should still take the game to a guaranteed win (i.e. no combination of moves prevent a win; this is automatically the case when you control 1 square more than 50% of the board; so branches can end there rather than at the conclusion of the game), but this explanation makes sense (and the correct follow up, yellow, is trivially obvious)
Are you saying just do the color with the most squares each turn? If that was the case then it’s pretty easy to beat, you can just go section off a big portion of the board and you will win
But sometimes the color that is less common will lead to a better board later on, like sometimes choosing a “worse” move will make your opponents move bad therefore making it a good move
@@Philyshark7 I would argue this is not really the same, because chess is a very complex game, where very importantly the opponents interact a lot with each other.
@@umikaliprivate In filler the opponents also interact for example choosing a color blocks the opponent from choosing the color; and where you expand also changes where you should expand. Its the difference in being shortsided with attacks vs looking ahead
I haven’t played TFT since I started that video on it lmao. I really like the game but it’s hard for me to just play casually and not devote 6 hours a day to it
Did you try playing multiple games against the other person's ai? With enough games played out you should see the random noise go away and have a clearer picture of which one plays better.