create one wrapper function AI.Gen() for two different AI gen methods