The field of machine learning is devoted to this, it's ultimate aim is to get robots and machine intelligences to display emergent intelligence, that is an output that is greater than the sum of it's parts, like ant colonies, simple individual entities co-operating to achieve otherwise impossible goals (rather like cells in a human body). To model this there is a whole segment of robotics, called swarm robotics that use large numbers of simple robots, programmed with simple rules (i.e. turn towards light, back away from obstacle). These swarms are not intelligent per se but achieve remarkable things by developing emergent behaviours. Intelligence is defined in many different ways, but we have yet to instigate intelligent mimicry, i.e. curiosity, fear etc, the robot or machine may have a sense of self but is not sentient, it can be programmed with behaviours to simulate these things and these behaviours can be developed based on the robots experiences.
The method employed by machine learning is to evolve the simple rulesets the robot is initially programmed with into more complex behaviours, this can take many generations and the robot will undoubtedly generate non-useful behaviours along the way (like a child putting horrible things in it's mouth, it may decide that bumping into a wall is a good thing, although this is generally recognised by the robot as sub-optimal fairly quickly!), but through this autonomous evolutionary learning process machines can optimise their outputs in ways that far outstrip human attempts. e.g:
http://www.spaceref.com/news/viewpr.html?pid=14394
Sentient robots? Sooner than you might think!
Sorry, I've rambled on a bit here but then I am a roboticist!