Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Product Lifecycle
  3. Running a Business
  4. robot detecting algorithms ?

robot detecting algorithms ?

Scheduled Pinned Locked Moved Running a Business
algorithmsquestion
14 Posts 6 Posters 31 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    Nah, a computer can only determine the instructions available; not the intent. If you see me add stuff to a list, how would you determine whether it is a list that represents a high-score, or a list of all email-addresses on your machine? A robot is a computer; and most applications run inside a virtual machine nowadays.

    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

    I Offline
    I Offline
    Isawyouoo
    wrote on last edited by
    #5

    You're insisting you know, of course a computer can :) did you heard about Artificial Intelligence, Deep Learning ... We should just find the way even if it is difficult

    L 1 Reply Last reply
    0
    • I Isawyouoo

      You're insisting you know, of course a computer can :) did you heard about Artificial Intelligence, Deep Learning ... We should just find the way even if it is difficult

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #6

      Isawyouoo wrote:

      We should just find the way even if it is difficult

      Why? Google's AI cannot differentiate between Turkey (the bird) and Turkey (the country). How is it supposed to infer intention from a set of instructions? And what benefit would that bring? None actually.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

      1 Reply Last reply
      0
      • I Isawyouoo

        Hi! I'm thinking months of a bot(algorithm) that can detect algorithms(written in assembly or any language) and say what they are talking about. int factorial(int number){ int fact=1; for(int i=1;i<=number;i++){ fact*=i; } return fact; } the robot will read this(analyze it) and say to me that this is an algorithm that calculate factorial, it's a function that return an integer, what...(maybe he should execute it virtually, track registers, vars...) our technology is slow in development, we just invented computers, no robots yet :(

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #7

        Let's hope the robot tells you that there is a better way.

        I 1 Reply Last reply
        0
        • I Isawyouoo

          actually it's possible

          J Offline
          J Offline
          jschell
          wrote on last edited by
          #8

          Isawyouoo wrote:

          actually it's possible

          No it isn't. I can only suppose you are using the formal definition of an algorithm, like the one in your original post ("this is an algorithm that calculate factorial,") In the vast universe of programming the cases of actual implementation of those methods represents such a small fraction of the total code base to be effectively zero. I would not be surprised if the percentage is even smaller than what it represented by winning the grand prize in a national lottery. In contrast then are a vast, vast number of "algorithms" in the general sense that do not have a formal definition. They solve business, research and even educational problems but one cannot 'define' them because they are unique. As an example following is some code that I just copied from my computer. What is the actual text that you expect your program to report for the "algorithm" for this?

          public static void test(Object s)
          {
          Date daysAgo = Date.from(Instant.now().plus(-30L, ChronoUnit.DAYS));
          System.out.println("Days ago=" + daysAgo);
          }

          I 1 Reply Last reply
          0
          • J jschell

            Isawyouoo wrote:

            actually it's possible

            No it isn't. I can only suppose you are using the formal definition of an algorithm, like the one in your original post ("this is an algorithm that calculate factorial,") In the vast universe of programming the cases of actual implementation of those methods represents such a small fraction of the total code base to be effectively zero. I would not be surprised if the percentage is even smaller than what it represented by winning the grand prize in a national lottery. In contrast then are a vast, vast number of "algorithms" in the general sense that do not have a formal definition. They solve business, research and even educational problems but one cannot 'define' them because they are unique. As an example following is some code that I just copied from my computer. What is the actual text that you expect your program to report for the "algorithm" for this?

            public static void test(Object s)
            {
            Date daysAgo = Date.from(Instant.now().plus(-30L, ChronoUnit.DAYS));
            System.out.println("Days ago=" + daysAgo);
            }

            I Offline
            I Offline
            Isawyouoo
            wrote on last edited by
            #9

            you said : but one cannot 'define' them because they are unique. if they are unique, sure they can be defined due to their unicity. the algorithm above, will be more understandable if it was in assembly or MSIL code, since it's very easy to examine each instruction and conclude the main idea and the objectif of the algorithm. As I say always, it's possible to figure what algorithms do, since every composition of instructions is unique.

            S J D 3 Replies Last reply
            0
            • L Lost User

              Let's hope the robot tells you that there is a better way.

              I Offline
              I Offline
              Isawyouoo
              wrote on last edited by
              #10

              That will the most beautiful day ! :)

              1 Reply Last reply
              0
              • I Isawyouoo

                you said : but one cannot 'define' them because they are unique. if they are unique, sure they can be defined due to their unicity. the algorithm above, will be more understandable if it was in assembly or MSIL code, since it's very easy to examine each instruction and conclude the main idea and the objectif of the algorithm. As I say always, it's possible to figure what algorithms do, since every composition of instructions is unique.

                S Offline
                S Offline
                Sascha Lefevre
                wrote on last edited by
                #11

                So what would be your desired output for the analysis of that code?

                If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

                1 Reply Last reply
                0
                • I Isawyouoo

                  you said : but one cannot 'define' them because they are unique. if they are unique, sure they can be defined due to their unicity. the algorithm above, will be more understandable if it was in assembly or MSIL code, since it's very easy to examine each instruction and conclude the main idea and the objectif of the algorithm. As I say always, it's possible to figure what algorithms do, since every composition of instructions is unique.

                  J Offline
                  J Offline
                  jschell
                  wrote on last edited by
                  #12

                  Isawyouoo wrote:

                  if they are unique, sure they can be defined due to their unicity.

                  That isn't the problem. How are YOU going to define all such algorithms so that your proposed solution can output some 'definition' of it. Your factorial one is easy. It exists. Computer science and math defines it so if your solution finds it it can write out "factorial" but others have no such definition.

                  Isawyouoo wrote:

                  As I say always,

                  As my previous post said and the other poster noted as well what exactly is your program going to put out for the code that I posted?

                  1 Reply Last reply
                  0
                  • I Isawyouoo

                    Hi! I'm thinking months of a bot(algorithm) that can detect algorithms(written in assembly or any language) and say what they are talking about. int factorial(int number){ int fact=1; for(int i=1;i<=number;i++){ fact*=i; } return fact; } the robot will read this(analyze it) and say to me that this is an algorithm that calculate factorial, it's a function that return an integer, what...(maybe he should execute it virtually, track registers, vars...) our technology is slow in development, we just invented computers, no robots yet :(

                    S Offline
                    S Offline
                    Sherinsun
                    wrote on last edited by
                    #13

                    There are lots of algorithms rolled out in recent days. if we follow the right technics our business won't affect in any of these.

                    1 Reply Last reply
                    0
                    • I Isawyouoo

                      you said : but one cannot 'define' them because they are unique. if they are unique, sure they can be defined due to their unicity. the algorithm above, will be more understandable if it was in assembly or MSIL code, since it's very easy to examine each instruction and conclude the main idea and the objectif of the algorithm. As I say always, it's possible to figure what algorithms do, since every composition of instructions is unique.

                      D Offline
                      D Offline
                      DerekT P
                      wrote on last edited by
                      #14

                      Isawyouoo wrote:

                      if they are unique, sure they can be defined due to their unicity.

                      You're absolutely right, of course they can be defined and identified. But the identifier can add no meaning and will probably look something like 87fad930-be8c-928a-0384feead334 If that's what you want, then fine. You're asking for AI that can look at "any" algorithm and, from the universe of possible "things to do", extract a meaningful name / description. (e.g. find factorials; compute best route between 3 points; find a perfect love match). To do that the AI has to have "Knowledge" of the entire universe and the language used to describe that universe. At this point - and for the foreseeable future - no AI system is that widely knowledgeable. You could build a system that operates on algorithms in a very well-defined sector (e.g. fluid mechanics, perhaps) such that the system could "learn" to categorise code that implements one of a set of predefined algorithms. BTW, you can also - without the need for any AI at all - build a rule-based parser that uses English-like language to say "this is a routine that takes a string and an integer and uses them to return a string and a boolean". Depending on the algorithm you might even be able to further indicate that it determines whether the first [n] characters of input [string] contains a make of car (provided you give your tool a list of every maker of cars).

                      Isawyouoo wrote:

                      it's very easy to examine each instruction and conclude the main idea

                      Sorry, but to put it bluntly, that's rubbish. A high-level language is (almost by definition) easier to extract "ideas" from. At a low level, trying to determine the importance of outcomes is virtually impossible. Loading a number into a register could be because you need that number in the register to do other things with outside of the algorithm itself, or it might be the primary objective of the algorithm. You can have no idea of the intent of the code when examining it at that level, partly because at that level the code is not divided up into clear enough structures to even know the boundaries of the algorithm, and partly because the sheer number of instructions at low level will complicate the task by several magnitudes. As an aside: many, many years ago I had the joy of maintaining a suite of COBOL programmes. The original coder had delighted in the following valid code:

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups