How to design neural networks optimally suited for certain t