AI queue algorithm
Quick fix + redefine algorithms