REGAI - Blueprinting regex-AIs

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    News:

    regex function reference : not available jet :(
    regex accelerated processor : not available jet :(

    current tasks:
    • task name - description
      • (url=post)user(/url) #These peoples work on the issue, links thread-ops + posts where possible.
    • Thread-OP - keep this thread up to date and think about it more.
    • regai_commands
    • regai_commonsense
    • regai_parser
    • regai_cc
    • regai_speak
    Intro:

    Before I started this thread, I posted somewhere else and I think it fits here too:
    , but if the "display-block interface" improved enough along with "display-block regex-AI" the might soon be able to.

    If you don't beg shine to improve AI but instead suggest to implement the interface improvements for display-blocks to game-variables where they aren't sufficient to allow us to handle it with regex-logic-AI, we could reuse it in other regex parsers unlike shine's obfuscated code.

    I will support such a suggestion when I see it and maybe it's time for some Community Content: proper regex function references (similarly to what PHP, Java and X2/"X3-Reunion"-Macros provide).
    I will try some tasks for the AI-part once regex is done (researching on human language support for a few years now), but I am not used to work with regex jet.
    There is another relevant thread:
    RegEx compilation thread
    But until now the OP only has one easy-to-use regex "Line parsing" for removing first/last line.
    What we need is much more.

    I like to quote the PHP manual, because it is very useful, clean and easy to use - samples:
    • "chop — Alias of rtrim"
    • "explode — Split a string by string"
    • "substr — Return part of a string"
      • "string substr ( string $string , int $start [, int $length ] )"
        • for example, $start can be negative and counts from the end then which is great after you used strpos (to "find the position of the first occurrence of a substring in a string")
    ( …to be … continued … in the next post because of expected post lengths in the future )
    [doublepost=1487092649,1487092591][/doublepost]( … continue … to be … well, I can blame the forum for future info fragmentation :( )

    Major Tasks:
    Note: if you find something that looks like it's Java-code or similar, it means that I use a way to describe the structure of it (.variablename, (brackets), FIXPOINTS important to the processor)

    regai_commands are the very foundation of higher AI-scripting - without these it's impossible to start.
    Some examples:
    • db_find .word
      • returns (index/position to fetch data from)
    • parse_next
      • returns (WORD "" || INT 0 || FLOAT 0.0 || …)
    • think_about .word
      • returns (.word (NOUN || VERB || ADJECTIVE || …))
    • think_from .word to .target
      • returns ( ((.word .target) DISTANCE) 1, ((.word .target) STRENGTH) PROBABLY )
    • speak_sentence .word1 .word2 .word3 .word4
      • tries to speak a sentence containing these words
      • will use the CURRENT_CONTEXT of these words
        • includes information about if a word is a NOUN, VERB, …
        • includes information about the connection of these words (DISTANCE, STRENGTH).

    regai_commonsense defines:
    • sentence structures - examples (VERB, NOUN)
    • default wisdom - definitions of (is, not, equal, computer. do this, computer. do that, …)

    regai_parser to structure logic.
    • word word word - separated by spaces.
    • word, word, word - a list of words
    • word, word and word - a list of (word, word) becomes a list of (word && word && word)
    • word, word or word - results in (word || word || word).

    regai_processor speed booster - reduces the display block count required to define the AI's function by providing higher logic and compressing the length of expressions - examples:

    regai_context or regai_current or regai_cc - (haven't decided jet) but it should handle the thing we call short-term-memory.
    • CC <> CURRENT_CONTEXT - use an alias for CC (both ways).
    • CC .word .otherword - .word was recently used with .otherword
    • CC .otherword . word - don't forget to link otherword backward!
    • CC .word NOUN - .word can now be used as a noun in sentences.
    • CC NOUN noun - .word is a NOUN is a noun, DISTANCE=2 (over NOUN).
    regai_speak - is responsible finding good answers.
    Do you notice how I used "DISTANCE=2" the in regai_processor example?

    If the question is "Do you like to have a cookie", "Yes I like to have a cookie" is closer than "I want a cookie" because that answer contains different words which are further away.

    However, you may still get the answer "yes, give me cookies!" from a human because humans have a personality and prefer some words over others.
    Humans sometimes forget intermediate steps and think simply: "cookie yes/no? → I want cookies"
    then "yes, cookie, (give me)" before they form a sentence "yes, give me (a) cookie (please)" which turns to a simplified form or a formal form depending on the mindset.
    • answer_quick - statement "yes" or formal "sir, yes sir!"
    • answer_short - telling a possible flaw "I guess … but this is magic for me".
    • answer_medium - "If we speak about the same, … . But this means … . And there are 41 more questions about the meaning of life"
    • answer_assumptions - "this is true if …" or "if … then this is true".
    • answer_questionFalse - "I think yes, is it the red one?"
    • answer_long - For example the contents the regai_speak paragraph as answer.
    Finding the right answer depends on multiple variables, but mostly on answer-length, severity of the topic and the type of the current interaction (forum post, military call / appeal).​
    Everything you add will make the AI more complex and bigger.
    But a certain minimum is required (short-term memory, etc) to have an efficient assistant, other things are for luxury only (showing personality).
    How human-like do you want your AI?
    • have personality
    • tell "emotions", have "global emotions" or just local opinions
    • be self-aware (self-similarity) or too dumb to see the self-similarity
    • have favourite words or phrases or states (put/sulk if getting told "you can not")
    … to be … continued …
    … continue … to be …​
     
    Last edited:

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Update:
    regai_search modifier brainstorming:
    I said, AI could be a path-finding algorithm, so how does search work?

    You just reduce the distance for your search term:
    in a folder like:
    music:downloads / creator:Mind.in.a.Box / album: / track:Supermassive Gravity

    Whenever you encounter {music, creator, album, track} and it matches {downloads, Mind.in.a.Box, ANY, Supermassive or Gravity}, you may disable use of that entry again and reduce distance by 2.
    distance = 1
    encounter music:downloads
    new list {NONE, creator, ablum, track} & new distance = -1​
    Effect:
    0 / downloads / Mind.in.a.Box / albumX / Supermassive Gravity / 5
    0 / regai_search(args) / downloads / Mind.in.a.Box / albumX / Supermassive Gravity / -1

    a negative or 0-value will bind the search-term to the target.
    Update:
    regai_preload brainstorming:
    Included Tags
    Excluded Tags

    Database:
    Chunk : 4546.movie « 6135.startrek « 6843.starwars
    Chunk : 8615.group « 4546.movie « 3612.game
    Numbers are absolute indexes similar to the record-time of a security-camera video.

    All entries are double-linked for when they have to be moved.

    Double-linking can take advantage of absolute-chunks and relative-addresses.
    Chunks and formatting-thresholds reduce overhead and formatting flux as well as load times and required display blocks and an entry can be present in multiple preload-chunks.
    Database tag-entries might be fragmented with topic-irrelevant neighbours, but the preload-chunks serve as cache for specific topics.
    An efficient implementation computes heavy-loaded entries with
    1. first timestamp or an index referring a timestamp
    2. recent timestamp & recent request counter for activity
    3. previous-recent timestamp & request counter for activity threshold tracking.
    4. These heavy-loaded entries are then becoming partners of entry-chunks for benchmarking purposes (grabbing new-lonely entries and ditching least-used ones from chunks)
     
    Last edited:

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    I have found a good video telling about the complexity of human thought.
    Maybe it is useful to see what AI-programmers are required to archive as a final goal.
    At youtube

    And now, I have found more information about how brain cells work.
    If they are sensitive to the time of input and analog, simulations of multi-neuron networks could be replaced by a simulations of single more complex neurons. (( Our brain is ten times more active than previously thought ))
     
    Last edited: