Hello and welcome to the group and Command!
CMO is a very rich combat simulation which would make a viable candidate for machine learning, and Lua has been used for machine learning, a la, Torch Library; however, bringing 3rd party libraries and file I/O are not permitted from the Command Lua environment in the public version of CMO. The Pro version (think very expensive) allows limited File I/O, but not 3rd party Lua libraries to my knowledge. Here one of the Command developers (like Apache85, or Michealm57au) may correct me (and would be welcome knowledge for me!)
I have some basic Machine Learning and AI training, and examined using AI/ML practices to enhance other combat simulators in the past. I am very interested in doing this kind of work against Command.
As far as licensing: users of Command may create scenarios and use Lua to enhance them to their hearts content (within the constraints imposed by the system) and this community is very good at supporting such efforts, though most people here are dabblers, and doing this for fun. Any Lua code that you choose to use may impose license requirements. There are various open source licenses, each with its own requirements. MIT License, GPL, GPL2, and others. To know what is imposed, you should read the license. Some require full disclosure of code and modifications, others simply allow you to use their code.
Keep in mind that the Command team will ONLY support the core simulation and answer questions regarding the published Lua functions available for use by Lua developers. Any enhancements that you add through Lua or bring in from 3rd parties code (a-la copy and paste into your library) will not be supported by the Command team. This is obvious to those who stop to think about it, but I said it anyway for extreme clarity.
If you proceed in working AI/ML on Command, you will undoubtedly create a lot of Lua code. I strongly suggest you organize it into a library of sorts. At the following post, I show how to create and use a Lua Library against Command's limited Lua environment. It may be of interest to you:
If you need further assistance, feel free to contact the forum, others, too, will help.