Added robot move algorithm