Scheduling astronomical facilities with an artificial intelligence core