Showing posts with label Pokemon. Show all posts
Showing posts with label Pokemon. Show all posts

Friday, July 26, 2024

Birthday Puzzle 2024

I make a puzzle every year on my birthday, always trying to make something brand new that pushes some personal limit. This year, I've gone with something, um, substantially less accessible than puzzles I've made in the past, but it "needed to be made" more than any of my other puzzles.

There is the concept of a "PokeDoku", which is a Pokemon-inspired take on a Sudoku. It consists of a 3x3 grid that must be filled out with 9 Pokemon total, and each row and column shares a characteristic, like "Fire-Type" or "Mega Pokemon". I found these puzzles very unsatisfying - there are many answers for each spot, and your score is determined by how few players chose that particular answer. Also, the categories are arbitrary, and it's only 3x3, where Sudoku is a full, perfectly balanced 9x9. So, I set out to try and make a better PokeDoku, and the result is below.

Now, if you happen to be one of the few people who identify as both a puzzle fiend and a Pokemaniac, you may be able to solve this puzzle without any kind of direction, so I'll just give you the puzzle and the most basic instructions.

  • Your goal is to fill out this 6x6 grid with unique Pokemon such that each row, column, and colored 2x2 square has something different in common. (These are big, obvious characteristics and not something like "They both have a height between 4'11" and 6'1" ".)
  • All variants of Pokemon present in the main series games can used, using their in-game names. Temporary form changes are associated with the base Pokemon, but are still considered their own Pokemon (with their own names).
  • There are a few very similar sets of Pokemon that will fill this grid, but there is only one unique solution when it comes to the row, column, and square characteristics.

 

But I do want to give a bit more direction to make this puzzle accessible outside of the hardcore Pokemaniacs out there, so read on for those details.

  • Columns in the puzzle represent Pokemon that share a type. All columns have a unique type.
  • Rows in the puzzle represent Pokemon that start with the same letter of the alphabet. All rows have a unique letter.
  • Squares in the puzzle represent the Pokemon's generation in order, starting from Generation I at the top left and ending with Generation IX at the bottom right.
  • Regional variations of Pokemon go by the same name, and therefore start with the same letter. Alolan Rattata is referred to as Rattata in-game, and so counts for R, not A.
  • Temporary form changes of Pokemon do have a different in-game name: Mega Pidgeot counts for M, not P. However, the temporary forms are assigned the generation of their base form, not the generation they were officially revealed.
  • As mentioned above, there are a few cases in which multiple Pokemon can fill a single square (these Pokemon would have to share a type, a generation, and the first letter of their names). But there are only six types and six starting letters that are possible, providing a unique solution up to symmetry.
 You should have everything you need to solve the puzzle! It should be completely solvable without any guesswork.

Happy solving! I might do a breakdown of the puzzle here in a month or so, because hoo boy, it was a problem with too many constraints.

Saturday, October 20, 2018

Interlude: Pokemon Hexagons

Happy Celebration of Mind Day! In the spirit of Martin Gardner, let's do some mathematics that's as approachable and intuitive as possible.

Let's take a little break from the Rose problems and talk about Pokemon. Love the games to this day, especially all the self-imposed challenges you can do. So, I was very excited to see graphics of Pokémon stat spreads as hexagons in an article recently, and of course it immediately got me thinking of a math problem.

For those of you who don’t know much about Pokémon, all species of Pokémon have “base stats”, which are measures of their competency in various areas. Each Pokémon has a stat for HP (Hit Points), Attack, Defense, Special Attack, Special Defense, and Speed. Base stats don’t seem to necessarily have an upper limit, but the highest existing base stat is Blissey’s 255 Base HP. There are a lot of other factors that determine a Pokémon’s actual stats, but we’re only concerned about their base stats for this problem.

The question that immediately came to my mind was, which Pokémon has the stat hexagon with the most area? Which Pokémon have a lot of area despite poor stats?


Here’s some example Pokémon hexagons. The first three are Abra, Kadabra, and Alakazam – an evolutionary line of Pokémon focused on Speed and Special Attack. Below them are Rhyhorn and Rhydon, an evolutionary line focused on HP, Attack, and Defense. And on the right we see Mew and Mewtwo, the legendary Pokémon from Generation I.

The order of the stats around the hexagon are important: Rhydon has a sizeable chunk of area because its HP, Attack, and Defense are all high and they’re right next to each other. (The order was decided by the article, and I kept the same it to answer my original question.) Obviously Pokémon with higher stats, like fully evolved Pokémon and legendaries, will have hexagons of larger area. But how should we distribute stats to get the most possible area?

It was at this point that I made a guess. I don’t know many of the newer Pokémon nearly well enough to make a great guess, but my intuition told me that something with very unbalanced stats would be the best shot at getting a high area. I went with Rhyperior, Rhydon's evolution, as the non-Mega non-legendary Pokémon with the most area, because it has gargantuan Attack, Defense, and HP, but next to nothing in the other three stats.

Now that I have a guess, let’s get to solving the problem. Let’s start by expressing it mathematically: you have six nonnegative radial lengths defining a hexagon. You also have a limitation that the sum of these lengths must equal a given constant. What radial lengths can you choose to optimize the area of the final hexagon?

This particular kind of hexagon is easy to find the area of, luckily. You can break it into triangles along the radial lines, and add up the areas of the six triangles for the area of the hexagon. Even more conveniently, we can use the 1/2(ab sin(C)) equation for a triangle’s area, which spits out a very convenient formula for us to maximize: (1/2)(sin 60)(ab + bc + cd + de + ef + fa). We can ignore the constant, because 2x will always be greater than 2y if x > y, so that leaves us with (ab + bc + cd + de + ef + fa), or the sum of adjacent products of base stats. Attack x Defense, Defense x HP, HP x Special Attack, and so on.

Now, how do we maximize this? Let’s try some test cases. I’ll use 600 as the base stat total, both because it’s conveniently divisible by six and because it is the actual base stat total of several Pokémon.

Case 1: Straight 100s across the board. The area of the hexagon (before the constant) is 60,000.

Case 2: 150, 50, 150, 50, 150, 50. The area is only 45,000.

Case 3: 50, 50, 50, 150, 150, 150. The area is 65,000. We’re getting warmer!

Case 4: 0, 0, 0, 200, 200, 200. The area shoots up to 80,000!

Case 5: 0, 0, 0, 0, 300, 300. The area maxes out at 90,000!

Case 6: 0, 0, 0, 0, 200, 400. We’re back to 80,000, which means we have our answer.

It turns out that a Pokémon with only Attack and Defense would have a greater hexagon area than any other distribution of its stat total! The way to maximize the sum of adjacent products of a list of six is to make two of the numbers as large as possible, and equal! Does this work with an arbitrarily large or small set? What if you used products of three numbers, like (abc + bcd + cde + ...)? Most importantly, it means my intuition was right, kinda!

I crunched the numbers (and made a little Excel tool for viewing any Pokémon’s hexagon, as well as its total area), and I was close, if not exactly right. The first non-legendary of the list, is Slaking, with a base stat total greater than most legendaries. Then there’s Garchomp, Metagross, Goodra– Pokémon known for being solid all around with maybe one exceptional stat. A heap of legendaries later, Rhyperior, the 15th non-mega non-beast non-legendary on the list. Feels like I’m having to invent rules to be right, but I’m still gonna round that up to a win. J