# Math, Testing, More Math, and Getting Useful Data

So I had a bit of a brainstorm for how to make my randomized puzzles and decided to use a new method. But then I started to wonder how the distribution of moves on the play area would be. Would they clump in one spot? Would they clump according to some rule or at random? Or would I get a good spread? This is a bit of how I figured that out.

I have already been using the debug log for lots of data gathering but unfortunately with a sample size of 800-80,000 or more the Log system in Unity is simply not robust enough for my purposes (Turns out latter it could have been but I still prefer the way I ended up using). Namely I needed a better find function that could tell my: “how many toggles in this column/row” or “how many toggles for this specific button”. So I had the output placed in a txt file before copy pasting that into a Word file and putting the data in an Excel file for ease of viewing. After doing this once (for a sample size of 100 puzzle generations) I figured I could do more of the work in the programming. I then had a txt file with the toggles for the specific buttons. But I realized fairly quickly that this data, while helpful, was a bit hard to understand. So I made it instead output the average number of toggles per puzzle over the 10,000 simulated puzzles. And since this new method allowed me to control exactly the number of toggles per puzzle I could figure out the number of average button presses per button if it were an ideally even spread. This was better but still a bit hard to read. Then I finally figured out what I was looking for was who far off the ideal average the actual averages were. so once I started to also output the deviation I saw the pattern clearly. And yep, as I feared it was clumping in almost the exact place I thought it would. Time to tweak some more numbers and see if I can smooth it out.