How to run concurrent sketches

The question I have regarding processing is how would I go about managing multiple rendering frames concurrently. For more context, what I am trying to create is a genetic algorithm to play a game which I will create using processing. To speed up the training time of the learning, I want to concurrently run a sketch multiple times, and have each sketch controlled by an agent.

My immediate thought is to simply have an external program execute a sketch multiple times but I am a little worried about how to handle the sketch input in this scenario.

Could anyone please point me in the right direction for how to achieve this?

Have you thought about offscreen graphics buffer with createGraphics()? Or, run multiple sketches and set up communication with OSC, etc.

1 Like

I was probably not going to run graphics unless enabled (place all calls to render within a conditional). Reading into OSC that looks to be interesting. If I’m reading OSC correct it seems to be a streaming format. I’ll look into create data streams and see if I can implement it this way. Thanks!

1 Like