Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.
alteryx Community

# General Discussions

Discuss any topics that are not product-specific here.

## Advent of Code 2023 Day 23 (BaseA Style)

Alteryx Community Team

6 REPLIES 6
13 - Pulsar

Spent a lot of time thinking about how to solve this problem. Path Optimization problems are an area I can use some work in. My methods are probably not optimal, but I was able to use a couple clever strategies to my advantage, which felt good to come up with and execute!

Workflow:

Spoiler
Main:

Maze Solving Iterative Macro (Part 1):

Graph Building Iterative Macro (Part 2):

Graph Traversal Iterative Macro (Part 2):

Happy Solving!!!

15 - Aurora

For, Part1 Brute Force worked well, but for Part2, it didn't.

Then, I examine the input data carefully, and solved with Spatial Analysis.

Pls see spoiler for detail

Spoiler
In your dataset, you would find the below "T" and "+" points. Those pints are conjunction points each other. You need to just trace these points from start to end.

By converting the map into spatial object, you will have the below objects.(To do so, you need to do a lot of work, I know)
By cutting out line objects into multiple lines by points object, you will have separate line objects(To do so, you need to buffer objects somewhat)

In Graph viz, it simply looks like

In short, you just have to solve based on the above graph, instead of the given input data that is too complicated and messy.
Calculation to get max distance took 1 min in my case. In  process of iteration, max no. of record reached to millions but it reduced soon after some more iteration)

17 - Castor

Part 1 is very simple. But part 2 is needed for the ingenuity.

Spoiler
Only just to walk simply.

Macro for Part 1:

Workflow for part 1 :

part 2:
There is no slippery floors now. The route was limited by it, but now there are too many routes to use the simple way.
So I tried to compress the route. The way is to find the nodes that have intersection that can go 3 or 4 direction. It took much time to find this way.

After that, I need the steps of each edge. To get them, I made the macro.

And then I did the BFS.

Workflow for part 1 and 2:

12 - Quasar

A check of the input data revealed that each branch had a direction. I solved this as a graph problem.

Spoiler

branch macro

part1 macro

part2 macro

12 - Quasar

same concept.

Spoiler
part1: skipped.
part2: find the point have 3 or 4 directions, calculate the steps for them.
then build a similar macro as part 1.
Then get the max value of the result.

workflow

part1 macro

part2: get path and steps for each cross nodes

part2 find path macro:
11 - Bolide

@AkimasaKajitani - Thank you so much for posting your solution! I was trying to solve it similarly to you, but was stuck on Part 2.

I was doing a weird thing where I started at Start and then each time I hit a node point, I split that into a new iterative line and then was only checking to see if the new points at the end were the same. I was ending up in these weird infinite loops and I couldn't get any good data out.

Your way of solving it where you ran all the node points through at once was so much smarter. That, plus your Contains instead of my exact match solved my issue with the infinite loops.

I also like how you did the Generate Rows to create the points to the left, right, above, and below. I was doing 4 Formula Tools and then Unioning the results, which worked, but your way is way cooler.

Labels