How to prevent an AI from get Insane, Depressed,...?

Your name or

Member
Feb 18, 2020
79
1
8
Hi
I want to use some (I dont know what it could be) Open AI System to find Youtube Videos I Automatically want post on my Homepage.
For that I would have an List of Keywords who must contain atleast. So an AI must learn what kind of Video I want to show and what who have the wrong Topic because some Words are similar but have a different context.

So what is when I tell an AI that the often are wrong? I watch a lot of Youtube Videos who People show amazing stuff what an AI could do like an AI who can solve an Game just with trial and error. So what is when there is a Game, Task,... who have an 99,999...% Failure Rate? In some Case the AI in the X Generation still doing nothing and just stand still. I would say the AI got depressed and on the other side an AI who constantly commit suicide and dont try anything different. So I would say the AI drived insane...

So how to prevent something?
Thanks