“The world breaks everyone and afterward many are strong at the broken places.”(Ernest Hemingway)
I’m still working on the solver for Tic Tac Logic. Work’s been on and off, and a little stressful, but nothing huge as far as deals go. After all in the end it’s always just advertising.
So today I’m working on how to solve this puzzle:
We hit a wall here because we ran out of location specific logic. There was nothing to be said specifically about the difference between any specific cells and it’s neighbors. There is an additional rule that 2 rows or columns can’t be identical.
This actually could move us forward in this particular puzzle. The image above is from the Conceptis App. There is a tool in that app that will show you currently identical rows. that’s what is being highlighted in green. The 6 values in the first row are identical to those values in the second row. So the other 2 values must be switched or the rows would be identical.
Basically, we can make these kind of conclusions when we have 2 rows. One of which has all of a value place and the other with all but 1 of a value placed. Basically, if all of the locations that exist in both are shared the last location must be the opposite value to avoid duplicating the row.
So how do we implement this?
Well we need a list of the comparisons:
We need to compare every row to every other row and every column to every other column.
The easiest option is to do a couple loops. We aren’t terribly concerned with efficiency here since we are animating anyway.
Once we are attempting to compare. We skip in there are not any values with <= 1 because the fact is that if there aren’t then there is nothing of interest to us in the comparison.
If there is we check if all the Xs or Os match.
Basically, here we mimic a set here and calculate the union of the set and difference of the set. If the difference is one location then we return that location as the location that we should insert into.
If there are multiple differences then the rows already don’t match, so we can’t conclude anything.
“A little nonsense now and then is relished by the wisest people.”(Roald Dahl): Perhaps some day all things will make sense.
I love computers. I love them so much more than people.
I’ve been doing a lot of complicated crap for work recently. But I’ve been coming how to work on the Tic Tac Logic game and I have to be honest. It’s been a lifesaver. It’s a moment of calm, clarity, and logic in a world that doesn’t always make sense.
I talked to someone at work about concerns that I might break old puzzles without knowing, and figured out I could test for that. So I added that.
Some are skipped because they aren’t implemented.
But that’s not why I’m here I’m here to discuss a small piece of beautiful logic.
I was running everything on a new puzzle earlier, and the puzzle got stuck around here:
images from the conceptis app
For whatever reason the logic that’s worked up until this point has failed us on this puzzle. So we need to figure out the next logical step.
There is logic for the 2 cells that I’ve flagged here. Lets look at this particular column.
We have 3 groups of blanks. The first two, the fourth and the sixth. We need 3 Os and 1 x. If we look at the 2 single blanks we see that there is a single O between them. We know that we can’t place an O in both these squares because that would be 3 Os in a row. So one of the 2 must be an X. Since we only have 1 X then we know the 2 in a row are both Os.
Which with all the rest of our logic will get us to the answer:
This is a rule that I was “aware” of before but didn’t need to finish any puzzles so it’s likely that it also may raise the speed of earlier puzzles as well.
Finding Pleasure: The Transformative Power of Hobbies
In our fast-paced world, where job and duties typically take center stage, hobbies act as an essential outlet for imagination and leisure. Participating in tasks that we are enthusiastic about not just enhances our lives however likewise provides a much-needed getaway from day-to-day stressors. Whether it's paint, gardening, playing an instrument, or perhaps collecting stamps, pastimes allow us to explore our rate of interests and create brand-new skills. They can fire up a sense of purpose, foster connections with similar people, and urge self-expression, making them an important element of a well balanced lifestyle.Moreover, leisure activities offer a
one-of-a-kind opportunity for personal development and exploration. By committing time to searches we truly appreciate, we open ourselves approximately new experiences and challenges that can improve our health. Research study has revealed that participating in pastime can improve psychological wellness, enhance state of mind, and also boost efficiency in various other areas of life. So, whether you're selecting up a new craft, diving into a thrilling publication series, or discovering the outdoors, welcoming your leisure activities can result in a richer, a lot more satisfying life. It's time to prioritize what brings you joy and make space for your interests!
Uncovering Pleasure: The Transformative Power of Hobbies
In our fast-paced globe, where work and responsibilities typically take center stage, pastimes work as an important electrical outlet for creativity and leisure. Engaging in activities that we are passionate regarding not only enhances our lives yet likewise gives a much-needed escape from daily stressors. Whether it's paint, gardening, playing an instrument, or perhaps collecting stamps, leisure activities permit us to explore our rate of interests and establish new abilities. They can ignite a feeling of objective, foster links with like-minded people, and urge self-expression, making them a crucial aspect of a well balanced lifestyle.Moreover, leisure activities provide a
distinct chance for personal growth and discovery. By devoting time to searches we really delight in, we open ourselves as much as brand-new experiences and obstacles that can improve our wellness. Study has shown that participating in pastime can boost mental health and wellness, boost mood, and also enhance productivity in other areas of life. So, whether you're selecting up a brand-new craft, diving right into a thrilling publication series, or checking out the outdoors, welcoming your pastimes can cause a richer, much more satisfying life. It's time to prioritize what brings you pleasure and make area for your interests!
Finding Happiness: The Transformative Power of Hobbies
In our hectic world, where work and obligations typically take spotlight, leisure activities work as a vital electrical outlet for creative thinking and relaxation. Participating in tasks that we are passionate regarding not only enhances our lives yet also provides a much-needed getaway from everyday stress factors. Whether it's painting, horticulture, playing a tool, or perhaps collecting stamps, leisure activities permit us to discover our passions and develop new skills. They can ignite a feeling of function, foster connections with similar individuals, and encourage self-expression, making them an essential element of a well balanced lifestyle.Moreover, pastimes offer a
special opportunity for personal growth and discovery. By committing time to searches we genuinely appreciate, we open ourselves as much as brand-new experiences and challenges that can enhance our wellness. Research has revealed that participating in recreation activities can improve mental wellness, enhance mood, and also boost performance in other locations of life. So, whether you're grabbing a new craft, diving into a thrilling publication collection, or exploring the outdoors, welcoming your pastimes can result in a richer, more satisfying life. It's time to prioritize what brings you delight and make space for your passions!
“Be a yardstick of quality. Some people aren't used to an environment where excellence is expected.”(Steve Jobs)
I decided to upgrade the logic to my tic tac logic thing. Mostly because it was taking forever to complete. Looking at every option was not efficient for the visualization. It made it take too long and made it difficult to watch or learn from.
As you can see the second one is much faster.
Basically I added logic that checks if the pattern in terms of filled vs. blanks is valid. If we are comparing cells are they filled/empty where I need them to be to make a conclusion? If I’m looking at a row is that row already filled in? It makes solutions much faster especially to larger puzzles.
“Victory is sweetest when you've known defeat.”(Malcolm Forbes)
And we have finally gotten to the solution to the easy puzzle. I added a new step which manages multiple groups which was able to bring us to a solution.
You can run the solution in your browser here.
Now I want to take a moment to talk about why I built the solution the way that I did. A computer can do things that a person can’t. It could just run through all the options till it found a solution. But there isn’t anything interesting about that. There is something interesting about standardizing human thought. Going through and saying, a human would solve the puzzle like this, can we teach a computer to do that.
This is interesting for a couple reasons.
We get a new insight into what it means to think like a person vs. think like a computer. We see the beauty of the human mind that we can hold all these factors together without actively thinking about them to solve a puzzle. A lot of this comes down to pattern recognition. We see `X - - O - X` in a puzzle and think oh we need to put an X in the middle so it’s `X O X O O X` without really understanding the process behind that thought. Teaching a computer the pieces of that means really understanding the pieces of that thought. That we have actually made about 3 logical conclusions that we smushed into one.
One of the interesting applications of computers is to teach humans. To do this we need to slow down computers. We need to think in terms of steps and moments. This is not something we optimize computers for so figuring out these visualizations helps us become more in tune with computers.
So let’s talk about the problem and how we solve it.
First I’d like to apologize in the previous examples the puzzle was actually slightly broken. One of the Xs was in the wrong location. It didn’t affect anything and now it’s in the right place.
Step one for the next solution was to figure out how to look at the blanks in groups. Basically we wanted to look at column 2 `X - - - X -` and determine that an O needs to be placed in the last location. To do this we need to know there are 2 sets of blanks. The first set is 3 long the second set is one long. We also need to know what we need to place. We need 3 Os and 1 X. Do you see the magic? We need 3 in a row and they can’t all be Os, one of those 3 has to be an X. This means the other location must be an O, after all we have one left over and no more Xs. Great.
We don’t know anything about the positioning for the 3 in a row, but we can fill in that square at least and hopefully it will help later.
The other thing I’d like to catch is row 2. We can determine something from the fact that we need to place 2 Os and there is an O in the middle of the blanks. We can do what we did above and create a 3 group. Like in the previous post when we looked at groups we can include neighbors in our count. So if we find a group of 2 blanks and the value we have more of is one of the neighbors we can only insert one of that value in opening or we will have 3 in a row. This means the extra location in row 2 must be an O because we need to place 2 and only one can be placed in the 2 group. This is all we place here, but the other steps will continue the logic when they repeat(this is what I meant when I said humans are making 3 logical conclusions for this scenario, I only told the computer to make 1 because then the conclusion is more universal that this exact pattern).
Now this step really starts to set us up for figuring out the puzzle long term.
And we are able to get all the way to a solution by repeating the steps that we’ve created.
“Who needs a thousand metaphors to figure out you shouldn't be a dick?”(Bo Burnham): perhaps the flickering of bits will solve the puzzle eventually
I started adding more complicated logic to the Tic Tac Logic solver.
So far:
Next:
The logic I added is about handling groups. It handles 2 situations:
There are 0 of one value to place.
There is 1 of one value to place and at least 2 of the other value.
The first situation is simple if only one value needs to be placed all the blanks should be filled with that value. The other circumstance is more complicated. We need to figure out a way to determine if we need to place the outer values. Basically, the logic for this is that in in a row of 4 cells 3 are the same value then one of the 2 center values must be the value there is only one of. If it was either of the outside cells then we would end up with 3 in a row of the same value. There are 2 main circumstances we need to handle.
There are 4 empty squares in a row and 3 of them are expected to be the same value.
There are 3 empty squares in a row and 2 of them are expected to be the same value, and one of the placed neighbors of the blanks is also that value.
In the first circumstance we need to place the repeated value on each end because we know that the other value needs to be in the center. In the second circumstance we need to place the repeated value on the opposite side from the matching neighbor.
In order to do this we need to add a bunch of helper methods.
We need to get a list of the cells in a row that are blank. This will allow us to make assertions based on them being blank.
The main assertion is that all of the items that are blank are in a row. If the blanks are all together then we know that this logic is a possibility.
Then we need to count how many Os and Xs are in each row, then invert that to how many Xs and Os are left in each row.
Then we can figure out if this case is occurring using these methods and our neighbors method.
If we are looking at a current row we process the steps for that row. Otherwise we make the next row or column active.
In this if statement the steps are in reverse order because values from the previous steps exist in the later steps so we are looking for the last thing that was added to determine what to do next.
Find a list of blanks.
Determine if the blanks are in order and if the value combinations are reasonable for this logic.
If the blanks are valid determine if there are any locations the logic leads to an insert in.
When we process the blanks we are checking 2 rule sets. If there are only values of one type left then we know that there is logic we can apply here(we don’t even care about spaces). Otherwise we confirm that the blanks are all in a row. If they are in a row and we need to place at one of one value and at least 2 of another value we know that this logic is possible.
When we attempt to determine insert if we are only inserting one value then we mark all the blanks as locations to insert.
If we need to place at least 3 of the value with multiples then we know each end is that value and we mark the first and last blank as locations to place it.
If we need to place 2 we look at each neighbor. If the neighbor is the same value as the value we are trying to place then we can place it in the blank furthest from that neighbor.
I also restyled the board to make it easier to follow:
Our first attempt at this step gives us:
Which actually sets us up to make some additional conclusions when it comes comes back around:
Which leaves us with the board:
We are going to manage to solve this someday I swear.