- correct some problems, loop cancel now always
- prepare td-learning
- simplify main loop
- refactoring
- refactoring