DIY solar tracking system without any sensors
It could be done without any sensor.

The first way is knowing the exact position in the Earth and in what direction the panel are looking, and depending of the time and day of the year the panel can be moved in different angles depending the hour and date.

Other way is looking for the maximum power point of the solar panel in the current place, and every time you move the solar panel. During all the search of the maximum power point in every place you are wasting some of the power of the power you are receiving from the Sun and in the motors moving the panel as well.

Also, this isn't a topic to use a machine learning. Surely the software needed in an Arduino board to manage a project like this wouldn't have more than 100 ~ 150 lines of code.

PS:
Maximum power point tracking are used to find the right amount of voltage and current a solar panel can give to achieve the maximum power delivery: https://en.wikipedia.org/wiki/Maximum_power_point_tracking