Peg toybox

Both The Sims 2 and The Sims 3 have a toy which toddlers can use to build the Logic skill. They look the same in both games.

Magical Mystery's "Shape, Rattle & Roll"
Kids put the square peg in, they take the square peg out, they shove the round peg in, and "I did it!" they'll shout! The Shape, Rattle & Roll has a myriad of shapes for a myriad of minds. Watch your kids grow smarter ... one geometric peg at a time. In The Sims 2, it's called Magical Mystery's "Shape, Rattle & Roll", and can be bought for §30. If FreeTime is installed, it builds enthusiasm for the Science hobby.

Baby Brainiac Peg Toybox
"'Babies are nothing but cooing simpletons who are often too easily amused. For example, toddlers love the Baby Brainiac Peg Toybox. It's like state-of-the-art entertainment to them, probably because they're too naive to know any better.'"

In The Sims 3, it's renamed the Baby Brainiac Peg Toybox, and the price is changed to §40. It will not raise a Toddler Sim's Logic skill any higher than three points, and those points will not be visible until the Sim starts skilling in Logic as a child or older life stage.