How to make AI?

Options

I have AI working on a host/master but when it comes to clients then the AI breaks down at random points and I don't know why.

I have a check if photonView.isMine and then I disable all the logic on the clients and just let the AI logic run on master but like I said that still breaks the AI down at random points.

Can somebody tell me how they did it and how it worked for them. Maybe the problem is that isMine check is not enough to make it run on master. Is there some other way?

Any help will be greatly appreciated. Thanks