Teach a machine how to code

I have this project of a machine that would learn how to code from a Stackoverflow dataset.

I recently came across HTM, I’m still learning so I’m not sure I understand everything but I wanted to say hi to see if there were other people working on similar pojects and if HTM could be of any use for the matter.

4 Likes

Hi, your project sounds really interesting. I am curious to know a little more detail – there are a lot of directions you could go. For example, you could design utilities that learn proper syntax for various programming languages, identify problems like potential memory leaks, and so-on. Or the direction might be language recognition that can classify common questions on SO and generate simple code snippets that answer the questions. Another possible direction might be a utility for porting code from one language to another. A really lofty idea might be a system that has a goal-oriented capability and writes its own unique code to try and achieve its goals.

There are certainly uses for HTM concepts in any of the above. I think narrowing the focus of the project to specific goals will probably help to identify components of the problem where HTM concepts will be most useful, or where other algorithms may fit better.

2 Likes

Thanks for your reply. I am still experimenting, and it’s mostly at the paper phase.

As naive as it may sound, I am trying to teach a machine common sense in reflexion processes, so that it could help us find answers to universe’s biggest questions.
My conviction is that human beings uploaded enough knowledge online for a machine to map it, and with the right “intelligence” to connect the right nodes and provide solutions to questions we’re asking ourselves, say “what is consciousness?”.

To start, I’m trying to teach a machine how to reply to the question “how to build a car?”. It implies teaching a machine enough “common sense” for it to have a “satisfaction function” (function evaluating the current iteration while browsing a recursive transition network) defining what is the a satisfying depth of answer: well, we need wheels, an engine… (and not “well, we need screws, paint…”).

Do you know of anyone working on this? I’m browsing frenetically the eternal golden braid, it provides good insights.

3 Likes

I have been thinking about such a thing, but mostly from a thought experiment point of view. It would be a system that (somewhat intelligently) reaches out (to humans) to solve part of a problem. The (very) pseudo code would be as follows

  1. is (source code for) a solution known (by scraping the net for code blocks)?
    a. yes, to 5
    b. no, to 2
  2. is a split to smaller problems known?
    a. no, to 3
    b. yes, to 4
  3. post a message to a stackoverflow / twitter, asking humans to split the problem
  4. split the problem into smaller parts, for each part, to 1
  5. done

This would eliminate the most difficult task of splitting up a problem into smaller problems (the main feat of a developer, I would say) and only focuses on combining code / ast’s

For me, as a developer, this removes having to type real code. I’d rather just be smart and tackle the problems that need tackling and let the code write itself. In the end, all code is just boilerplate.

1 Like

Very interesting. I’m not sure an intelligent developer assistant would be the best use case of such a technology but that could definitely be one.
It would have to be very good or the developer would spend more time trying to understand/debug what the machine did than doing it from scratch.

1 Like

I think we can make a good team to make the basic data structures and connectivity of human brain that posses the satisfaction points you mentioned by smapproaching the life as a result of analysis of data from a virtual memory and I think I can see how the structure is formed. I also think creating the next generation of machines is the ultimate solution to make this world a better place

What kind of structure are you thinking of? If you’d rather keep that private you can DM me. I was thinking of a structure based on variables containing machine executable code for infinite recurrence.

1 Like

Relational thinking is the basic process of human mind. Interactive machine development enhanced the development of functions carried out by human brain. What we need to think about at this stage of technological advance is making a control unit for the brain to frame a better dimension than we already use in real life analysis to inspire next generation machines to code and create a better place.

I was thinking storing not bits of executable code, but an AST graph. From introspection, I would think that I myself store bits of AST in my mind and when programming, combine these bits together and use that as a starting point.

This may perhaps be a good starting point for a genetic programming algorithm, that basically fixes the bugs introduced by combing disparate pieces of code.

1 Like

Yeah but we need to reinvent the concept of graphs here. Think of a student who learns relational thinking or analysis from the earliest* stage of life. He is dealing with problems by plotting them on graphs. What is the basic thing we know about graph. It has a point that can be described by two set of values which can be protected into higher dimension beginning from 1D to some unknown D. Problem no 1.you are dealing with a point by projection theory now you can’t think of its dimension in a level that has nothing to do with the concept of numbers. Follow me?

*relative concept

I don’t think I follow, are we talking about the same kind of graphs? I get a feeling you mean charts here. I am talking graph theory: https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)

Side note: I am rather keen on graph, because at the moment I believe that a major breakthrough will be to be able to encode any graph into an SDR. I am specifically interested in RDF graphs from the semantic web, as they provide a vast knowledge base for abstract reasoning. I think being able to compare graphs loosely by using SDRs would allow for reasoning by analogy. (by recognizing analogous relations)

I am talking maths here. Typically speaking. What if we were trying to plot the concept of relativity with out building a fundamental data structure that can accommodate large set of data and functions from a virtual perspective of both memory and processor. I think that’s the simplest way I can communicate about it

In basic problem solving approach. You build that algorithm in a top down approach but you are dealing with it in a bottom to top growth of data. Relativity can not be implemented in such a format. My point is that

Here is something that might interest you:
http://conceptnet5.media.mit.edu/

I quote:
About ConceptNet

ConceptNet is a semantic network containing lots of things computers should
know about the world, especially when understanding text written by people.

It is built from nodes representing words or short phrases of natural language,
and labeled relationships between them. (We call the nodes “concepts” for
tradition, but they’d be better known as “terms”.) These are the kinds of
relationships computers need to know to search for information better, answer
questions, and understand people’s goals.

1 Like