They say the robot apocalypse will be the result of military experiments gone awry, but it may just happen through kids messing around with toys in their bedrooms.

On Monday, building block maker Lego is announcing a new Mindstorms robot that can be controlled by a smartphone and programmed without a computer.

The EV3 robot, which is being shown off at the Consumer Electronics Show in Las Vegas, has at its heart a large programmable controller brick that can be used to create and set behaviours on its Linux-based operating system.

It also has USB and SD card slots that can expand on its 16 megabytes of onboard memory, as well as an infrared sensor that detects IR sources. The robot can thus be programmed to follow an IR emitter around.

The EV3 set will come with instructions for building five robots — from a sword-wielding, mohawked humanoid to a fully articulated snake — with a further dozen available online. Each of the five base models will come with its own apps for Android and Apple's iOS, which will allow users to remotely control their creations.

In a demo with Lego engineers before CES, the robots responded well to the smartphones, which connect over Bluetooth. Pushing forward on the screen caused the machines to move in the corresponding direction, while shaking the phone made them wiggle.

Robot toys such as the Parrot AR Drone are starting to flood the market, with numerous new products expected to be unveiled at CES. The cost of producing such toys is coming down dramatically, while their ease of use is quickly improving through the addition of smartphone and tablet controls.

Camilla Bottke, global project lead for Lego, says Mindstorms toys are different from competitors because they also entreat users to build and program them.

Lego's sword-wielding, mohawked humanoid robot comes with its own apps for Android and Apple's iOS, which will allow users to remotely control their creations.Lego's sword-wielding, mohawked humanoid robot comes with its own apps for Android and Apple's iOS, which will allow users to remotely control their creations.

"It's about adding different ways for children to interact with the robot by combining the physical and the virtual," she says. Kids don't get into Mindstorms "because they love computers — they might — but it's because of the physical part of it."

The EV3, which will be released this summer, can be up and running in about 20 minutes by inputting rudimentary behaviours through its control brick. More in-depth programming can be done with the downloadable computer software, says Oliver Wallington, the technology concept lead.

He also expects that the addition of the USB and SD slots will greatly increase the possibilities and flexibility of the robot.

"It's a huge open door. We don't know what's going to happen," he says. "You could plug a hard drive into it, if you really want to."

One of the EV3's additional features will be its three-dimensional building instructions, which will come in the form of a tablet app built by software developer Autodesk. The app will enable builders to be more accurate in their construction by letting them pan around the model to see the next steps.

Bottke is coy about whether such an app might be forthcoming for regular Lego toys as well.

"It could be coming," she says.

Lego launched Mindstorms in 1998 and, according to news reports at the time, the robots were quickly banned by Silicon Valley companies, which found that employees were wasting too much time tinkering with them. Since then, the robots have spawned competitive building leagues and become Lego's highest-grossing toys.