I haven’t encountered these 2 issues yet - and I’ve “played” with the robot for hours around the house.
The algorithm takes measurements with the distance sensor of it’s surroundings on a 120 degrees window - the total number of measurements is 12 (one at each 10 degrees increments). Then with an unsupervised algorithm (K-Means) it detects the direction to which the distance to a given object is the highest. This makes me wonder if it’s the shape of room that makes it behave this way you described.
Regarding the 2nd issue, while I haven’t encountered it yet, I speculate it’s caused by a timing issue.
In the next few days, when I’ll get some time on my hands, I’ll try to see if there’s an actual timing issue and I’ll also add some verbosity to the output in order for you to get more insight of what it happens. When I’m done with these changes, I’ll let you know here.