-3
$\begingroup$

Neural Networks are often used to divise efficent ways of accomplishing tasks. We switched to higher levels of code because the additional levels of abstraction meant it was easier for people do code, at the cost of computational efficency.

Would it be possible to use a neural network to create programs in lower level code or even binary in order to increase computational efficency? How complicated would this look? Is there a better way of making an AI that codes?

You can learn about neural networks here: https://en.m.wikipedia.org/wiki/Artificial_neural_network

$\endgroup$

closed as off-topic by L.Dutch - Reinstate Monica, sphennings, Sec SE - clear Monica's name, Azuaron, Frostfyre Jan 22 '18 at 20:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about worldbuilding, within the scope defined in the help center." – L.Dutch - Reinstate Monica, sphennings, Sec SE - clear Monica's name, Azuaron, Frostfyre
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ There is an interesting nuance in how this question is worded, with regard to how neural networks operate. "Could we teach?" or "Can the AI learn?" $\endgroup$ – Alexander Jan 22 '18 at 19:48
  • $\begingroup$ @Alexander the reason I say we is because the humans have to set up the neural net system with the parameters to learn. So the question becomes if we could set up the system correctly in the first place for such a thing to occur $\endgroup$ – Elazertwist Jan 22 '18 at 19:50
  • 5
    $\begingroup$ Can you make clear why you think this is a Worldbuilding question and not a Computer Science question? $\endgroup$ – L.Dutch - Reinstate Monica Jan 22 '18 at 19:53
  • 5
    $\begingroup$ I also don't see how this is worldbuilding. The answer is also a fairly boring "yes, definitely, but not yet" $\endgroup$ – Tim B Jan 22 '18 at 19:57
  • 1
    $\begingroup$ Worldbuilding is not open to any "fantastical hypothetical". This is not a "What if?" site. We are a collaborative community dedicated to Building Worlds (come on, it's in the name!) $\endgroup$ – Azuaron Jan 22 '18 at 20:24
5
$\begingroup$

First off, if we drop the big about neural networks, we already do exactly as you say. We have software which takes high level instructions and generates highly optimized low level code (all the way down to the binary machine code) which humans could never possibly do on their own. On modern large projects, it is simply unreasonable for a human hand to write all that machine language code at the same level of speed a modern compiler can.

So what changes when we add neural networks into the mix? The first thing that changes is that we no longer have any sort of guarantee that the program we request will actually be what we get. Neural networks don't offer that kind of guarantee, and they are never designed to offer that guarantee. They're designed to learn and find the patterns you didn't think to tell them about. If you only ever use a neural network to do what you told it to do, you're wasting everyone's time.

So what you're looking for is not just some technology. You're looking for us to desire the development of software to fuzzy standards. There needs to be value in providing an incomplete story of the software we want to see, rather than providing a complete one. Find a reason for why we would want this sort of technology, and it will appear.

One possible reason: unique user experiences. If each user wants a slightly customized experience, they may want their device to learn their habits. Maybe one user has a slight twitch which causes some single-taps to become double-taps, so they want double-taps to be a bit harder to accidentally do. To program to this environment means programming to ten-thousand environments. That's hard to do, and very fuzzy. A neural network may be able to take your code (written in some high level form) and information about how the user wants the program to act (gathered by their own neural network), and custom write an application for that user and their UI style.

Of course, you may already have a fuzzy task in mind. In FPGA design, there is a notoriously nebulous step called "routing" where the compiler figures out where to put elements on the chip. This process is already being explored as a candidate for neural networks. So, in that sense, your question of "is it possible" can indeed be answered with "yes, it is possible, and we do it already."

$\endgroup$
  • $\begingroup$ FPGAs are some of the coolest voodoo ever created by man. And the reason the routing would benefit from neural network learning is that it must be 100% automated. All chips are "routed" during the design process, but it's a human-controlled process - and despite its automation, it's still very much an art form. It's an ultra complex combination of maze and jigsaw puzzle that sometimes only human intuition can overcome. Once it can be 100% automated, it'll be blow-your-mind cool voodoo. Would that I might live to see the day. $\endgroup$ – JBH Jan 22 '18 at 20:53
  • $\begingroup$ +several thousand for "if you only ever use a neural network to do what you told it to do, you're wasting everyone's time" please explain this to my AI crazy boss $\endgroup$ – bendl Jan 23 '18 at 2:51
0
$\begingroup$

Yes, and AI is already doing it.

The is already a number of code analysis tools that check the code for potential errors and unoptimized lines, and suggest corrections. As of today, these tools are better than humans at spotting all the potential problems, but not always good at suggesting improvements. They sure can get better, but we need to take a look at software development process as a whole.

Generally we can divide writing a program into at least 3 phases:

  1. Requirements
  2. Design
  3. Implementation

Your question is focused on phase #3 (implementation), but it cannot be solved alone without phases 1&2 completed and formalized. If AI has to write the code while making guesses about the exact purpose of our program, we can't expect good results. AI can be good at playing games like chess, because there are formalized rules and goals. If there is no formalized goal, AI as of today can not help.

So, there are some possible solutions as to how we can better engage the AI.

  1. Make requirements and design more formalized. This will give the AI a stable playing field, but keep in mind that most problems with software are due to the flaws in requirements and design, not with the code itself;
  2. Let AI handle all the process from very beginning. Today's technology is still too far from it, but I can imagine AI interviewing project stakeholders just like business analysts/project owners do it today.
$\endgroup$
  • $\begingroup$ While software certainly provides assistance in writing code currently and does virtually all translation from high level code to low level executables (normally via a compiler) it would strain the the definition of AI to call those programs AI. Also, when working with a high level language, the process of formalizing the design is tightly intertwined with the actual coding and in some cases may be indistinguishable. $\endgroup$ – TimothyAWiseman Jan 22 '18 at 20:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.