The miracle of peer review and development in science: An agent-based model