can your AI uwu ?

  • 9 Replies
  • 27807 Views
*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
can your AI uwu ?
« on: August 27, 2020, 11:01:08 am »
Code
package chobit;

public class UwU {
/*
* l -> w r -> w n -> ny ove -> uv ! -> UwU
*/
public String convertToUwU(String str1) {
String uwu = str1;
uwu = uwu.replace("l", "w");
uwu = uwu.replace("r", "w");
uwu = uwu.replace("no", "nyo");
uwu = uwu.replace("ne", "nye");
uwu = uwu.replace("ni", "nyi");
uwu = uwu.replace("nu", "nyu");
uwu = uwu.replace("na", "nya");
uwu = uwu.replace("ove", "uv");
uwu = uwu.replace("!", "^w^");
return uwu;
}
}
« Last Edit: August 27, 2020, 10:56:44 pm by yotamarker »

*

frankinstien

  • Replicant
  • ********
  • 642
    • Knowledgeable Machines
Re: can your AI uwu ?
« Reply #1 on: August 27, 2020, 07:56:10 pm »
Below is partial code of a unit testing generator I developed where data is collected from a database or is generated randomly.  That library will be integrated with the AI I'm developing. All one need do is select the assembly file which is the dll of class UwU and the code will execute. The process is called Reflection and you can dynamically on the fly compile code or use existing libraries where you just reference the location of it. So Symbolic AI's wouldn't have a problem integrating this process but with an NN there are some issues.

Code
/// <summary>
        /// creates objects with parameters in their constructors
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="assemblyLocation"></param>
        /// <returns></returns>
        private static List<dynamic> CreateAndInitializeProperties(ViableMapAndData aMap, string assemblyLocation)
        {
            Assembly anAssembly = Assembly.LoadFrom(assemblyLocation);
            return CreateAndInitializeProperties(aMap, anAssembly);
        }

/// <summary>
        /// creates objects without parameters in their constructors
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="assemblyLocation"></param>
        /// <returns></returns>
        public static List<dynamic> CreateAndInitializePropertiesWoParams(string fileName, string assemblyLocation)
        {
            Assembly anAssembly = Assembly.LoadFrom(assemblyLocation);
            return CreateAndInitializePropertiesWoParams(fileName, anAssembly);
        }   

/// <summary>
        /// creates objects with or wihtout parameters in their constructors
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="anAssembly"></param>
        private static List<dynamic> CreateAndInitializeProperties(ViableMapAndData aMap, Assembly anAssembly)
        {
            List<dynamic> results = new List<dynamic>();
            List<Object[]> parameterList = ParameterExtruder.BuildParameterArrayList(aMap, ".ctor");
            if (parameterList.Count > 0)
            {
                foreach (Object[] parameters in parameterList)
                    results.AddRange(CreateAndInitializeProperties(aMap, anAssembly, parameters));
            }
            else
                results.AddRange(CreateAndInitializeProperties(aMap, anAssembly, null));


            return results;
        }

        /// <summary>
        /// creates objects without parameters in their constructors
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="anAssembly"></param>
        /// <returns></returns>
        private static List<dynamic> CreateAndInitializeProperties(ViableMapAndData aMap, Assembly anAssembly, object[] parameters)
        {
            List<dynamic> result = new List<dynamic>();           
           
            var propertyStore = aMap.StoredData.Where(x => x.MapType.Equals(DataMapType.PropertyColumnMap)).FirstOrDefault();
            foreach (DataRow aRow in propertyStore.ActualData.Rows)
            {
                dynamic aObject = InI.CreateObjectFromAssembly(anAssembly, aMap.TheMap.ClassName, parameters);
                InI.InitializeProperties(aObject, aMap.TheMap, aRow);
                result.Add(aObject);
            }
            return result;
        }


*

frankinstien

  • Replicant
  • ********
  • 642
    • Knowledgeable Machines
Re: can your AI uwu ?
« Reply #2 on: August 27, 2020, 10:25:04 pm »
I just want to add that through reflection a Symbolic AI can grow its repertoire of capabilities and integrate a verbal interface to perform new added functions, without haveing to train on a gagillion or gazillion(I'm not sure which is larger) examples!. So it is possible today to do something like what you see in Star Trek and other scifi movies: "Computer give me a chart of the relationship between alien space ships and the observed wormholes."   :D

*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: can your AI uwu ?
« Reply #3 on: August 27, 2020, 10:44:54 pm »
I just want to add that through reflection a Symbolic AI can grow its repertoire of capabilities and integrate a verbal interface to perform new added functions, without haveing to train on a gagillion or gazillion(I'm not sure which is larger) examples!. So it is possible today to do something like what you see in Star Trek and other scifi movies: "Computer give me a chart of the relationship between alien space ships and the observed wormholes."   :D

I dont undewstand what youw dww does.
maybe you couwd give some inyput and output exampwes ^w^
and what do you meany integwate with anyy cwass ?
how does it decide what to do with any extewnyaw cwass ?

updated class code

*

frankinstien

  • Replicant
  • ********
  • 642
    • Knowledgeable Machines
Re: can your AI uwu ?
« Reply #4 on: August 27, 2020, 11:08:50 pm »
With reflection, all I need to do is apply the updated class you just made. Meaning I just reload it for the updated version, which could be set up as a file change or some kind of notification that triggers the update. So the process you list in your class is what gets executed.   8)

*

frankinstien

  • Replicant
  • ********
  • 642
    • Knowledgeable Machines
Re: can your AI uwu ?
« Reply #5 on: August 27, 2020, 11:15:35 pm »
Let me add that languages like c# and java have System IO class monitors that can detect file changes.

*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: can your AI uwu ?
« Reply #6 on: August 28, 2020, 05:47:24 am »

*

frankinstien

  • Replicant
  • ********
  • 642
    • Knowledgeable Machines
Re: can your AI uwu ?
« Reply #7 on: August 28, 2020, 06:13:23 am »
you must mean run string as code, something like this :
https://stackoverflow.com/questions/4389232/run-piece-of-code-contained-in-a-string

No, it's called Reflection:

Java
.NET

While you can run a piece of code as a string using reflection it's not the best way to use it. If you apply it the way my unit test generator does then the performance hit is only on the first instance of instantiating the object, after that the object is cached for future use and the performance is no different than if you compiled it in the calling code.

*

frankinstien

  • Replicant
  • ********
  • 642
    • Knowledgeable Machines
Re: can your AI uwu ?
« Reply #8 on: August 28, 2020, 06:25:48 am »
In Python, it's called Introspection.

But Python is largely an interpreter with the exception of CPathyon, so performance with python really isn't there.  :'(

*

frankinstien

  • Replicant
  • ********
  • 642
    • Knowledgeable Machines
Re: can your AI uwu ?
« Reply #9 on: August 29, 2020, 07:16:14 pm »
Since kotlin is a java related language it has reflection as well, which is described here.

 


OpenAI Speech-to-Speech Reasoning Demo
by ivan.moony (AI News )
March 28, 2024, 01:31:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am
Nvidia Hype
by 8pla.net (AI News )
December 06, 2023, 10:04:52 pm
How will the OpenAI CEO being Fired affect ChatGPT?
by 8pla.net (AI News )
December 06, 2023, 09:54:25 pm
Independent AI sovereignties
by WriterOfMinds (AI News )
November 08, 2023, 04:51:21 am
LLaMA2 Meta's chatbot released
by 8pla.net (AI News )
October 18, 2023, 11:41:21 pm

Users Online

315 Guests, 0 Users

Most Online Today: 396. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles