So Joshua and all the troops set out to attack Ai. Joshua selected thirty thousand of his best soldiers and sent them out at night.