Towards loss minimization in power distribution systems using AI, the WatDist algorithm