The external programs launched by the generator should be incapable to do anything but read from the standard input, and write to the standard output, and be limited to in the maximum amount of RAM that can be used.
Some trails to explore:
- Use ulimit to restrict the amount of memory usable
- Run the AI as a user without any permission
- Save the pid from the port and then kill it when time spent exceed allowed time.
The external programs launched by the generator should be incapable to do anything but read from the standard input, and write to the standard output, and be limited to in the maximum amount of RAM that can be used.
Some trails to explore: