AI with Pyramids of Self Programmable Gates