I added a finite state machine system to the imps to control their behaviour states, its simple for now but can be easily expanded on later for things like building and combat etc. It also make bug hunting easier as it gives some idea what state is causing any issues, although its been surprising bug free so far.
So the imps current states allow them to check for any dig jobs and carry them out, when there are none they go idle for now.
Tiles being dug out now also record how many imps have picked them to dig. I used this as an extra picking parameter so imps spread themselves out and dont all go for the same tile, with the exception of if a corridor is being dug then they will help each other.
So the job picking order is now > tiles in reach > tiles in los > closest tile > tile with least imps digging it else tiles not in los > closest tile > tile with least imps digging it.
There is a bug in R123.2 los behaviour so at the moment imps see all dig orders they can reach which throws off their picking order, but that should work in the next c3 update.
Next challenges are giving tiles being dug health so they dont get dugout instantly, being able to pick up and drop imps, being able to slap imps to make them work faster.