Poly magnets also known as Programmed magnets, or correlated magnets, are magnetic blocks that incorporate correlated patterns of magnets with alternating polarity, designed to achieve a desired behavior. Magnet pairs can be programmed to attract or repel with a prescribed force and engagement distance, or, to attract or repel at certain a spatial orientation. Different parts can be programmed to interact only with specific other parts that have been coded to respond to each other. The same parts can be programmed to attract and repel at the same time. This behavior is achieved by creating multi-pole structures comprising multiple magnetic elements of varying size, location, orientation, and saturation. This behavior is achieved by varying the polarity and/or field strengths of each source of the arrays of magnetic sources that make up each structure. The resulting magnetic structures can be multi-dimensional.
These are developed from ferrites, rare-earth materials, ceramics, and electromagnets alike, and the correlation effects are scaled from permanent magnets of various sizes.
Polymagnet pieces are $1.60 and up. They come in 10 different types with different functionalities so you can play with and build an array of structures. More information available at the Polymagnet website.