Fix dynamic AI seeking function.