There's no function here that is analogous to a decision tree, or a parametrized model, just an optimizer and a loss function with a simulator. This isn't AI in the way it's commonly understood, which is the function that takes an input and produces a learned output.
An optimizer produces a single optimized set of parameters. AI is a (usually parametrized) function mapping a collection of input states to a collection of output states. The function is the AI, not the optimizer. I'd suggest anyone who thinks otherwise go and do some basic reading.