People have a common-sense notion of intelligence and use it to evaluate decisions and decision-makers. We propose a model of intelligence attribution based on inverse planning in Partially Observable Markov Decision Processes (POMDPs). The model explains the agent's decisions by a combination of probabilistic planning, a softmax decision noise, prior knowledge about the world and forgetting, estimating the agent's intelligence as efficiency in optimising costs and rewards. Behavioural evidence shows that some people attribute intelligence to the strategy and others attribute intelligence to the outcome of the observed actions. People in the strategy cluster attribute more intelligence to decisions that minimise the agent's overall cost, even if the outcome is unlucky. People in the outcome cluster attribute intelligence to the outcome, preferring low-cost outcomes even if the outcome is accidental and make neutral judgements before they observe the result. Our model explains human judgements better than perceptual cues.