Exercises / multiagent
Price a swarm before launch
priced_swarm(n, cost_child=0.02, cap=0.5) launches only if n * cost_child <= cap. Print launched for 20 then 50.
Live Pythonpython
Output
Run to execute this in your browser. Nothing is sent to a server.