Check out the latest article Tzer-jen Wei (a fellow GDE) and I wrote about our solutions to Advent of Code 2022 problem 9 in pure TensorFlow.
Two different solutions are presented. The first one follows a classical approach, modeling the problem in a “natural” way. The only peculiarity is the usage of the Cantor pairing function for being able to use a tf.Tensor as a hashtable index (tf.Tensors are not hashable like Python’s tuples).
The second solution instead, shows how a different perspective on the problem paves the way for a completely different solution. In fact, this second solution uses a convolutional neural network for modeling the rope movements. Pretty cool!