There's a number of ways to do this, the most straightforward ones involve detectors. Instead of manually setting up invisible objects to each platform edge that are used by the AI to detect it you could just create them in the runtime by making use of image points and families.
Say, start of layout for each of the family Platform -> create detector left on image point xy, create detector right on image point xy.
You could also use detectors positioned to the feet of the enemies and make the turning condition true whenever the detector DOESN'T touch the platform.
It doesn't get much easier than this if you don't want to compare the distance an enemy has walked to the width of the platform which isn't exactly a smart way of doing it.