Skip to content

Instantly share code, notes, and snippets.

@hosh
Created June 1, 2009 17:58
Show Gist options
  • Save hosh/121625 to your computer and use it in GitHub Desktop.
Save hosh/121625 to your computer and use it in GitHub Desktop.
# http://bit.ly/10e2Jy
# Advances in Agent communication (Proceedings, 2003)
# Datastructure per agent
@name = 'Pete'
@knowledge = {
'a' => [['f', 'b'], ['c', 'd']],
'd' => [['e', 'b'], ['c']],
'p' => TRUE
}
@questions = {
'a' => nil, # new question
'd' => 3 # first unread answer
}
# first unread article;
@fid = 45 # @fid means "forum identifier"
@bookmark = { 4 => 2, 56 => 6 }
@answered = { 4 => TRUE, 8 => TRUE }
# Datastructure per question
N = {
'owner' => 'Claude',
'question' => 'bake a cake',
'answers' => [
{ 'owner' => 'Francois',
'answer' => [ 'knead the flower', 'bake the paste' ] }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment