Advertisement
Agent_Silence

test

Mar 20th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. local tRecent = {
  2. {"water",15}
  3. } -- What is recently heard about
  4.  
  5. local tFrequent = {
  6. {"water",15},{"food",10},{"home",5},{"work",20}
  7. } -- What is frequently heard about {name of item heard about, how many times it has been mentioned}
  8.  
  9. local tFirstRef = {
  10.    
  11. }-- The first thing that comes to mind
  12. local sLearnBool = 1 --Lean towards frequency or recency for equal averages (1 is frequency, 2 is recency)
  13.  
  14. function update()
  15. table.sort(tFrequent,function (a,b) return a[2] > b[2] end)
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement