Yes, you will want to research "program induction" and "program synthesis". For a review of recent work in both, see https://arxiv.org/abs/1802.02353
For program synthesis applied to the "Atari" deep learning benchmark check out https://arxiv.org/abs/1806.05695