yao learned the principles of confucianism , but also studied the teachings of others such as zhuge liang ; a military advisory who lived from 181-234 a.d. liang advocated providing people with beliefs that could be applied to the problem at hand .