John D
John D

Reputation: 39

Creating agent-sets based on randomly assigned values

Thanks to Nicholas and Seth for their help on my issue yesterday (Assign each number to 3 turtles). I've encountered a second problem and could use some advice.

To give you an idea of the model:

  1. there are 500 "disciplines" of knowledge.
  2. there are 1,500 "scientists" (Turtles), each with a single "discipline".
  3. a question will be asked containing 3 disciplines.
  4. scientists will answer if their "my-discipline" is one of those contained in the question.
  5. for each of the three disciplines in the question, the scientist with the highest score (based on random 10 set of quality of answer), will be selected and their results printed.

I am having trouble creating an agent set for each discipline contained in the question. I am using:

to give-an-answer ; turtle proc 2
    if member? my-discipline question ; if the turtle's ID is one of the disicplines in the      question
    [ set expert my-discipline ]  ; mark as expert.  
end

I know that by creating an agent set for each discipline, I can use max-one-of to find the highest rated answer... but I can't get to that point!

Any help would be greatly appreciated!

John

Upvotes: 1

Views: 92

Answers (1)

Bryan Head
Bryan Head

Reputation: 12580

turtles with [ member? my-discipline question ]

will be an agentset containing the turtles whose discipline is in the question.

Upvotes: 2

Related Questions