There is no doubt that Henry Pym is a scientific genius, but advanced robotics and artificial intelligence is far afield from biochemistry and biophysics. The achievements in those areas credited to him (for contractual reasons) in Marvel Comics are actually the work of his friend, William Magnus.
Magnus was of old Dutch New York stock and his family knew the van Dynes socially (perhaps even dating Janet) before he became a student of Janet’s father, Vernon. Magnus surpassed his mentor at young age, had developed intelligent robots, the Metal Men, had an impressive list of patents and government contracts, and an advanced laboratory complex while Hank Pym was still falling into anthills.
There had been robots before, certainly, but Magnus was interested in his creations doing more than passing Turing’s test. He wanted emotive machines, something truly animate. Magnus was an esotericist as well as a man of science, and his theories on emotion were an odd mixture of alchemy and psychodynamics. He brought forth the traits than were already in the metal, he said. His nuclear-powered Philosopher’s Stones, the responsometers, were an attempt to model the mind or soul more than the brain. One of his Metal Men, Tina, made with platinum responses, fell hopelessly in love with him. For reasons conscious or unconscious, Magnus always told her this meant her responsometers were faulty.
For his second series of robots, he tried encoding the psyche of a human as a substrate. Ultron would be birthed from Hank Pym’s brow. This robot was self-evolving, and he transformed himself into an Oedipal monster who wished to kill Pym so it could have Janet van Dyne. Ultron’s reproduction has become almost viral. So many iterations have existed and become separate lines of evolution, he has proved impossible to eradicate.
When Ultron decided to build his own wife, he had Magnus aid him (perhaps with brainwashing, perhaps not). He wanted Janet van Dyne’s soul in a robot body. He named that new being “Jocasta.” His psychocircuits had surpassed any human concern with irony. Jocasta was as unlucky in love as any of her predecessors, dying at the hands of Ultron just when she found her feelings requited by Machine Man.