A neural network is disclosed. The neural network comprises a plurality of optogenetically modified neural cells being three-dimensionally distributed in a hydrogel medium and being disconnected from any solid support having a shear modulus above 1 GPa.