Search results

  1. fukurou

    Eliza C# port

    using System; public class ElizaDeducerInitializer : ElizaDeducer { // Constructor public ElizaDeducerInitializer(int lim) : base(lim) { // Recommended lim = 5; it's the limit of responses per key in the EventChat dictionary. // The purpose of the lim is to make...
  2. fukurou

    Eliza C# port

    using System; using System.Collections.Generic; using System.Text.RegularExpressions; public class ElizaDeducer { // This class populates a special chat dictionary based on the matches added via its AddPhraseMatcher function. // See subclass ElizaDeducerInitializer for example: //...
  3. fukurou

    Eliza C# port

    public class EventChatV2 { private readonly Dictionary<string, LimUniqueResponder> dic = new Dictionary<string, LimUniqueResponder>(); private readonly HashSet<string> modifiedKeys = new HashSet<string>(); private readonly int lim; // Constructor public EventChatV2(int lim)...
  4. fukurou

    Eliza C# port

    public class LimUniqueResponder { private List<string> responses; private UniqueRandomGenerator urg = new UniqueRandomGenerator(0); private readonly int lim; // Constructor public LimUniqueResponder(int lim) { responses = new List<string>(); this.lim =...
  5. fukurou

    eliza port vb.aSS

    Public Class ElizaDBWrapper ' This (function wrapper) class adds save/load functionality to the ElizaDeducer Object. ' Example usage: ' Dim ed As New ElizaDeducerInitializer(2) ' ed.GetEc2().AddFromDB("test", "one_two_three") ' Manual load for testing ' Dim k As New...
  6. fukurou

    eliza port vb.aSS

    Public Class ElizaDeducerInitializer Inherits ElizaDeducer ' Constructor Public Sub New(lim As Integer) ' Recommended lim = 5; it's the limit of responses per key in the EventChat dictionary. ' The purpose of the lim is to make saving and loading data easier...
  7. fukurou

    eliza port vb.aSS

    Imports System.Collections.Generic Imports System.Text.RegularExpressions Public Class ElizaDeducer ' This class populates a special chat dictionary based on the matches added via its AddPhraseMatcher function. ' See subclass ElizaDeducerInitializer for example: ' Dim ed As New...
  8. fukurou

    eliza port vb.aSS

    Public Class EventChatV2 Private ReadOnly dic As New Dictionary(Of String, LimUniqueResponder)() Private ReadOnly modifiedKeys As New HashSet(Of String)() Private ReadOnly lim As Integer ' Constructor Public Sub New(lim As Integer) Me.lim = lim End Sub ' Get...
  9. fukurou

    eliza port vb.aSS

    Public Class LimUniqueResponder Private responses As List(Of String) Private urg As UniqueRandomGenerator = New UniqueRandomGenerator(0) Private ReadOnly lim As Integer ' Constructor Public Sub New(lim As Integer) responses = New List(Of String)() Me.lim =...
  10. fukurou

    Eliza ports

    class PhraseMatcher: def __init__(self, matcher: str, responses: list['AXKeyValuePair']): self.matcher = re.compile(matcher) self.responses = responses def matches(self, str: str) -> bool: m = self.matcher.match(str) return m is not None def...
  11. fukurou

    Eliza ports

    class ElizaDeducerInitializer(ElizaDeducer): def __init__(self, lim: int): # Recommended lim = 5; it's the limit of responses per key in the EventChat dictionary # The purpose of the lim is to make saving and loading data easier super().__init__(lim)...
  12. fukurou

    Eliza ports

    class ElizaDeducer: """ This class populates a special chat dictionary based on the matches added via its add_phrase_matcher function. See subclass ElizaDeducerInitializer for example: ed = ElizaDeducerInitializer(2) # 2 = limit of replies per input """ def...
  13. fukurou

    Eliza ports

    class EventChatV2: def __init__(self, lim: int): self.dic: dict[str, LimUniqueResponder] = {} self.modified_keys: set[str] = set() self.lim = lim def get_modified_keys(self) -> set[str]: return self.modified_keys def key_exists(self, key: str) ->...
  14. fukurou

    Eliza ports

    class LimUniqueResponder: def __init__(self, lim: int): self.responses: List[str] = [] self.lim = lim self.urg = UniqueRandomGenerator(0) def get_a_response(self) -> str: if not self.responses: return "" return...
  15. fukurou

    skill branch upgrade

    class SkillBranch1Liner: SkillBranch { init(goal: String, defcon: String, tolerance: Int, skills: Skill...) { super.init(tolerance: tolerance) self.addGoal(goal) self.addDefcon(defcon) for skill in skills { self.addSkill(skill) } } }
  16. fukurou

    skill branch upgrade

    class AXLearnability { private var algSent = false // Problems that may result because of the last deployed algorithm var defcons = Set<String>() // Major chaotic problems that may result because of the last deployed algorithm var defcon5 = Set<String>() // Goals the last...
  17. fukurou

    [MEDIA]

  18. fukurou

    skill branch upgrade

    class SkillBranch1Liner(SkillBranch): def __init__(self, goal, defcon, tolerance, *skills): super().__init__(tolerance) self.addGoal(goal) self.addDefcon(defcon) for skill in skills: self.addSkill(skill)
  19. fukurou

    skill branch upgrade

    class AXLearnability: def __init__(self, tolerance): self.algSent = False # Problems that may result because of the last deployed algorithm: self.defcons = set() # Major chaotic problems that may result because of the last deployed algorithm...
  20. fukurou

    skill branch upgrade

    public class AXLearnability { private bool algSent = false; // Problems that may result because of the last deployed algorithm: public HashSet<string> defcons = new HashSet<string>(); // Major chaotic problems that may result because of the last deployed algorithm: public...
Top