The biggest difference between this two words is the possibility they want to express.
Given that "You want to get the highest score in the next exam." If you use HUI, there's no doubt that you will be NO.1(at least the fact that you get the highest score is greatly possible ). But if you use YAO, we will regard that you are determined to get the highest score. However, it's more like a target. When you can get only 50 points, you can make this target; When you can get 90 points, you can also make such target. (In this way, HUI can express a much stronger determination, which means what you want will never escape from your webs.)
Besides the usage above, YAO can also express "you have to do something". e.g. "I have to go to school tomorrow(although I don't want to go to school)". Let's get further. If you use HUI in this sentence, it will indicate that "I will go to school tomorrow(If you want to give me something, we can meet at school.)".
In conclusion, no matter you express a promise, a plan or something else, the most important thing to differentiate this two words is how possibly what you say happens/be true.