I believe it’s illegal according to the law, it’s what I’ve been told since I was a kid.
But Taiwanese are rather pragmatic when it comes to laws and rules. It’s highly unlikely to get you in trouble unless you are causing problems. In Taiwan, the general rule that I found to be true is don’t cause problems and it’s all good.
If I teach my pet chicken to fight in self-dense, and my friend teaches his chicken to fight in self-defense, and if they happen to pick a fight with each other, and we make a bet on it, is that illegal? What if we take bets from people who happen to be passing by, and other chickens (on their own initiative) line up to fight the winner, and we write it all on a chalkboard that someone left there. Wrong?