So umm to actually answer his question... there are two incredibly obvious and basic ways and they are incredibly self explanatory,.
1. Rest them during a lag of being hit. Whether that means upthrows-> rest, pound-> rest, u-tilt -> rest, uair-> rest, nair->rest drill->rest or whatever else you can think of comboing into a rest.
2. Rest them during a lag after on of their moves. This can mean, down dodges, smash attacks, rolling, laggy moves (like alot of u-b's) air dodges, CC'ed dash attacks you know... whatever.
I am sure you are ALL very aware of this but basically in short, vs humans they will not be predictable enough (unless you are incredibly mind gamey) for it ever to be beneficial in the long run to just throw and un-setup rest into the game, on a consistent basis. However bad DI, and general stupidity will allow for rests that are... opportunistic. Thus being able to rest a AI is in no way related to being able to rest a person (other than finding the correct hit box.) You will simply need to practice against people, recognize rest oppurtunities, and capitalize on them, this takes practice, and all people are going to be able to give you advice on this subject is a few non-self-evident rest oppurtunities (like drill rests, u-throw on fast fallers, which smash attacks are free rests if you shield) it is however much easier to know about them than it is to use them.