From 251248adfab36b061eb8fdd08aa54b318462da65 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 28 Mar 2018 15:49:50 -0400 Subject: Revamped bot with new algorithm The percentages currently used by the generator are trial-and-error and may be changed in the future. refs #1 --- generator/mood.cpp | 94 ------------------------------------------------------ 1 file changed, 94 deletions(-) delete mode 100644 generator/mood.cpp (limited to 'generator/mood.cpp') diff --git a/generator/mood.cpp b/generator/mood.cpp deleted file mode 100644 index b74211c..0000000 --- a/generator/mood.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include "mood.h" - -namespace cadence { - namespace generator { - - // The categories are: - // - party (+danceable, -acoustic, +electronic, +party) = ~.21 - // - chill (-danceable, +acoustic, -aggressive, -electronic, -party, +relaxed) = ~.49 - // - crazy (+aggressive, -relaxed) = ~.02 - // - happy (+happy, -sad) = ~.009 - // - sad (-happy, +sad) = ~.02 - // - instrumental (+instrumental) = ~.12 - // - vocal (-instrumental) = ~.10 - - mood::mood(type t, double prob) : type_(t) - { - if (prob >= 0.5) - { - probability_ = prob; - positive_ = true; - } else { - probability_ = 1.0 - prob; - positive_ = false; - } - - switch (t) - { - case type::danceable: - { - category_ = (positive_ ? "party" : "chill"); - - break; - } - - case type::acoustic: - { - category_ = (positive_ ? "chill" : "party"); - - break; - } - - case type::aggressive: - { - category_ = (positive_ ? "crazy" : "chill"); - - break; - } - - case type::electronic: - { - category_ = (positive_ ? "party" : "chill"); - - break; - } - - case type::happy: - { - category_ = (positive_ ? "happy" : "sad"); - - break; - } - - case type::party: - { - category_ = (positive_ ? "party" : "chill"); - - break; - } - - case type::relaxed: - { - category_ = (positive_ ? "chill" : "crazy"); - - break; - } - - case type::sad: - { - category_ = (positive_ ? "sad" : "happy"); - - break; - } - - case type::instrumental: - { - category_ = (positive_ ? "instrumental" : "vocal"); - - break; - } - } - } - - }; -}; -- cgit 1.4.1