Algorithmic Trading involves the use of Advance Mathematical Model to generate signals and derive trading strategies based on those signals. The following makes development of an optimal trade execution algorithm utmost necessary.
The below article explains how Reinforcement Learning can be used to formulate and Solve for Optimal Trade Execution Problem.
https://www.borealisai.com/en/blog/aiden-reinforcement-learning-for-order-execution/