Synthesizing an artificial synapse for artificial intelligence