hi
the first problem is that autofocus subroutine was never touched (or maybe it was't found yet)
the method that you decribed here, makes many problems, it's useless in many situations... it focuses too close every time...
probably when it scans the whole focus range, makes some statistical data about the nearest, most sharp, highest count of sharp af regions, to choose the most sharp focal length.It's a bit complicated. but the face detection algorthm is even more complicated...
so it hink much better than AiAF can't make anyobody with contrast detect methods(maybe if it would be vertical too, focus dosen't work many time if you try to focus on horizontal lines...)