Based on evolutionary programming, a novel algorithm for designing the topology and weight distributions of feedforward networks is proposed. This algorithm can evolve network architectures and connect weights( including biases) simultaneously and produce very compact networks. It can escape from structure local minima due to its global search capability. The effectiveness of this algorithm has been confirmed by the simulation results.