Yes, it's trivial. For board games all AIs essentially use Alpha–beta pruning + scoring function and an approximation to that scoring function can be autogenerated using standard machine learning techniques.
For (classic) video games it's actually somewhat similar but rather than a board being fed in as an input you just feed in a bitmap of the display (sometimes at a lower resolution using compression techniques to reduce input features) and optimize moves made to maximize the score at any point rather than end-game.