A simulation of language evolution