More can be said on these topics, but here are some older answers as a place to start:
Thailand: https://www.reddit.com/r/AskHistorians/comments/1dc20m/how_did_siam_thailand_avoid_colonization_by/?ref=share&ref_source=link
Ethiopia: https://www.reddit.com/r/AskHistorians/comments/12gn2u/how_did_ethiopia_remain_independant_for_so_long/
Japan: https://www.reddit.com/r/AskHistorians/comments/1a8xns/what_allowed_japan_to_so_effectively_modernize/c8vnmqf/
These are also fairly popular FAQs, so you can probably find more answers in the FAQ section.