4 ms·
Can you share any of the parallel A* code? I’m currently looking at using A* for use in generative design and am pretty ignorant about parallelising code. Would
by brutusborn 3y ago
Can you share any of the parallel A* code?
I’m currently looking at using A* for use in generative design and am pretty ignorant about parallelising code. Would love to learn more!
- samsquire 3y agoI've taken a very naive approach and it does NOT scale. It uses python multiprocessing. I think the fScore updates pickling and serialization - communication and synchronization lock overhead is slowing it down. It simply does not parallelise. This is my code generator/program synthesiser, it synthesises assembly instructions from two given states of memory and registers to take it from one to the other, including hidden states such as functions. https://replit.com/@Chronological/SlidingPuzzle3#main.py https://replit.com/@Chronological/SlidingPuzzle3#main.py
- brutusborn 3y agoThanks, regardless of ability to parallelise it looks interesting.
- samsquire 3y agoI've changed the algorithm to not send fScore updates and treat each branch as independent. This speeds it up from 16 seconds to 320 milliseconds. I am thinking how to make the algorithm scale, by creating better and alternative program candidates in each thread.