R/TURN.R

TURN <-
function(speakerID, hearerID){
	erosion=world$erosion
	situation= SITUATION(speakerID)
	proposition= PROPOSITION(speakerID, situation)
	prep= PREPARE(speakerID, proposition, situation)
	utterance= PRODUCE(speakerID, prep)
	interpretation= INTERPRET(hearerID, utterance, situation)
	population[[speakerID]]$age = population[[speakerID]]$age + 1
	population[[hearerID]]$age = population[[hearerID]]$age + 1
	population<<-population
	success=SUCCESS(proposition, interpretation, situation)
	FREQUPDATE(speakerID, prep, success)
	FREQUPDATE(hearerID, interpretation, success)
	if(success==1){
		if(erosion==TRUE){EROSION(hearerID, interpretation)}
	}
utterance
}

Try the MoLE package in your browser

Any scripts or data that you put into this service are public.

MoLE documentation built on May 2, 2019, 3:02 p.m.