Intelligent treatment planning for cancer radiotherapy