‘Artificial synapse’ could make neural networks work more like brains