Knapsack problem is a classical combinatorial optimisation problem. This paper presents greedy continuous particle swarm optimisation (GCPSO) algorithm to solve the knapsack problem. First, the greedy strategy is introduced into the process of particles' initialisation based on standard particle swarm optimisation (SPSO). This strategy guarantees the particle swarm has a better beginning in a degree. Second, based on the analysis of the characteristics of the knapsack problem's solution space, and in terms of the binary code in evolutionary computation, the paper presents multi-state coding. T...