In 602, YAMASHIRO studied and mastered tonko which was ninjutsu described in the book of military science as "art to seize good luck and to circumvent bad luck" under Kanroku and became the founder of the principles of tonko hojutsu in Japan (Nihonshoki (Chronicles of Japan) Volume 22).
602年（推古天皇10年）、観勒に師事して『吉を取り凶を避ける術』とされた兵書の忍術である遁甲を修め、日本における遁甲方術の祖となった（日本書紀・巻第二十二）。