Wikipedia:Reference desk/Archives/Computing/2017 June 11

= June 11 =

Code generation by artificial intelligence
Google's AlphaGo has beaten the world’s best human Go player. It seems like AI technology today is sophisticate enough to do more complex jobs. So I wonder if there are some noticeable projects that aim to generate useful code by AI. For example, an Automatic programming application which can translate from human language to programming language like C/C++. As we can see, traditionally, writing computer program requires intensive human interference. - Justin545 (talk) 02:09, 11 June 2017 (UTC)


 * Computers already write code solving certain extremely narrow and well-defined problems. See LEX and YACC. We are a long way from an AI that can code 1% as well as an 8-year-old who is just learning how to program his first Arduino. If we ever do build an AI that can code (a BIG if), and if that AI is better at creating AIs that can code than humans are (another BIG if), it will be able to write an AI that is better than itself, and then that new AI can write another, still better, then that one can write another...


 * On would think that the computer the AI runs on could end up being the limiting factor, but if (another big if) the Reprap project ever reaches the point where a Reprap can create a better Reprap, we could see the same runaway improvement in the computer hardware.


 * Fortunately, Wikipedia has a lot of experience with things that grow without limit. See my Essay at WP:CANCER :) --Guy Macon (talk) 02:54, 11 June 2017 (UTC)


 * It sounds sad and hopeless. AI can only solve pretty narrow problems as you said. IBM Watson seems to only solve medical issues and nothing else. Understanding natural language or solving general problems by AI is likely to be impossible. :( - Justin545 (talk) 03:26, 11 June 2017 (UTC)


 * "Heavier-than-air flying machines are impossible". — Lord Kelvin, 1895


 * I would say that it's impossible for the foreseeable future. Plus, where are you going to find users who know what they want and can give clear and well-defined business rules?  A Quest For Knowledge (talk) 05:42, 11 June 2017 (UTC)


 * If you want an explanation as to why computers haven't written much code, it has to do with the humans. To simplify the process, assume that I want a computer to write a program to add two single digit numbers. It will ask for one number, ask for the next number, and then spit out the sum of the two numbers. Getting it to ask for the first number will take a while, but that isn't too hard. Then, we need to get it to ask for a second number, which isn't too hard. Then, we want it to spit out a number after asking for the first two numbers. That isn't too hard. Those three things are easy because there is no relationship between them. Surely a computer will accidentally prompt for input at some point in randomly writing code. Now, getting it to add the two single-digit inputs is the hard part. If the computer is close to getting it right, we reward it. If it is completely wrong, we punish it. How do you, as the human, decide when and how much to punish or reward? For this example, lets assume that the test is that we give full reward if the answer is exactly correct. Then, to decide punishment level, we take the absolute value of the correct answer minus the answer the computer gave us. Assume the correct answer is 8 and the computer answered 5. The punishment level will be 3. That will eventually get the computer to write code that can sum two digits, right? Wrong. We are thinking like humans, not computers. The computer will "evolve" to a condition what limits punishment. The minimum answer possible is 2. The maximum answer possible is 18. The middle answer, which is the one with the least punishment, is 10. So, the computer will most likely write a computer that asks for two numbers and then responds with 10. I've used this example repeatedly, having a population of randomly created Java byte code generators. The result is always the same. It asks for two numbers and spits out 10. If the human involved (me) was more intelligent, he would devise a better test and, possibly, the AI would perform better. But, humans aren't all that smart. So, the tests they develop greatly limit the AI. 71.85.51.150 (talk) 18:22, 11 June 2017 (UTC)


 * I think the point would be making the computer understand both natural language and programming language. The only feedback in reinforcement learning is reward (IIRC) which is an insufficient clue and results in sort of guessing. Give some correct examples to the computer to teach it what is an adding operation (perhaps, sort of like neural network which is trained by examples) to avoid guessing. And teach how adding operation is represent in programming language and the connection to the word "add" in English. - Justin545 (talk) 03:23, 12 June 2017 (UTC)


 * By the way, Both neural network and reinforcement learning algorithms are adopted by AlphaGo. I mean reinforcement learning still has it's value especially in chess-like board games and neural network is not the only solution to AI. - Justin545 (talk) 04:04, 12 June 2017 (UTC)


 * Let's look at it another way, using the same example of the instructions: "write a program to add two single digit numbers". The following questions come up:


 * 0) Do we allow negative numbers ? If not, what error message do we give if they attempt to supply them ?


 * 1) Where does it get the numbers ? Randomly generated ?  Read from a file ?  Speech recognition ?  Typed on a keyboard ?


 * a) Let's say the answer was "Typed on a keyboard". Now, do we expect input like "1+2 " or "1,2 " or "1 2 " or "1 2 " or "1 2 " or "12 " ?  Alternatively, instead of waiting for to be pressed, do we accept the typed input automatically after the 2nd digit is pressed ?  Or do we wait some period to allow them time to correct a typo and then accept the input automatically ?  If so, what period of time and do we always wait this period or take the input immediately, if they hit ? Note that if we allow negative numbers then there may be up to 4 characters typed in, along with any separator, not just 2.


 * 2) What do we do with the results ? Save to a file ? Read aloud with speech generating software ? Display to the screen ?


 * a) If the answer is to read it aloud, do we call 0 out as "zero", "nil", or something else ? What accent do we use ?  Male or female voice ?  What speech rate ?  What volume ?  Do we say something like "The sum is" before we read the number ?


 * b) If we save it to a file, what is the file name ? Do we ask the user to enter the file name ?  Is there a default file name ? Do we need a widget to allow them to select an existing file name ?  Do we default to the current directory/folder or ask them which one we want ?  What if we don't have write access to the file or folder/directory they choose ? What if the file system is full ? What if that file name already exists ?  Do we overwrite it automatically, or give an error, or pop up a warning that it already exists and allow them to overwrite it ?  Or do we offer an option to append to the file ?  What is the format of the file ?  A .txt file ?  Is there a header or column headings ?  Do we just put the answer in the file or the entire operation, like "1+2=3" ?


 * 3) What do we do if the input is something other than a pair of 1 digit numbers ?


 * 4) What happens when the program completes this task ? Do we end the program, automatically ask for the next pair of numbers, or ask the user what they want to do ?


 * And these are just some of the Q's that come up with a very basic program. For a more complex program, the Q's expand dramatically. Any type of automatic code generation program would need to have default settings to answer all of these Q's, which the user could then change. StuRat (talk) 14:41, 12 June 2017 (UTC)


 * Think that the computer is a computer science student or a software engineer so maybe you can talk to it "Based on your common sense, writing a program to add two single digit numbers. Ask me if don't know how the details of input and output are implemented.". Making conversation with computers has been realized such as what you would do with iPhone Siri. - Justin545 (talk) 03:01, 13 June 2017 (UTC)


 * Agreed. I'm not saying it's not possible, just that it's much more complex than one might think.  And for a complex program it would need to ask so many clarification questions as to negate much of the advantage over writing the code yourself.  Either that, or it would be full of "bugs", here being defined as not acting the way you intended it to act, because you never specified that to the automatic programming tool.  (And, assuming the automatic programming tool isn't perfect, it may well introduce some bugs of it's own.) StuRat (talk) 15:05, 14 June 2017 (UTC)


 * There is a MASSIVE general misunderstanding regarding "AI"-Projects like Google's AlphaGo! According our article TensorFlow google's "TPU"-Processors manage "up to 180 teraflops of floating-point performance" per second and against Lee Sedol 50 TPUs where used. This is less an "intelligence" approach but a brute force one. 180 teraflops * 50 = 9 Petaflop's aka 9 thousand billion (9 000 000 000 000/s)  float point calculations per second. Btw. this is only a tiny machine. The TOP500 is currently lead by a chineese Supercomputer that manages a peak of 125 Petaflop's. In a picture these duels more or less look like someone with a gun dueling a nuclear bomb. --Kharon (talk) 15:11, 12 June 2017 (UTC)
 * If you compute brain power in FLOPS, Lee Sedol should have won easily. The human brain is slow, but absurdly parallel - apparently the median estimate for brain power is 1018 FLOPS, or about 1000 PetaFLOPS . --Stephan Schulz (talk) 19:44, 12 June 2017 (UTC)


 * The problem is, what do you mean by "generating code by AI"? I can see two ways of looking at it, and in both cases we already have it.
 * In the restricted sense of "you give some inputs to the computer and out comes some code", then Eclipse or any IDE qualifies: you click to create a form or a given workflow and it takes care of the mundanities of writing the code.
 * In the more theoretical sense of "the computer looks for some input without active supervision and future behavior is determined without human intervention", any kind of unsupervised machine learning (such as AlphaGo, or at a smaller scale our friend ) could qualify. Of course, that is philosophically not much more than a data read followed by if/else tests; but then, what is your criteria? Tigraan Click here to contact me 15:32, 12 June 2017 (UTC)


 * There may be a general misunderstanding that the hard part about programming is the programming language. It very much is not. The hard part is exactly specifying the problem to solve, and natural language is very bad at that. Formal languages like programming languages are much better. Generating specialised code from data is also not that hard - I've done it since about 1999, when I noticed how many errors I could avoid. And, as mentioned above. automatically written parsers and scanners have been around since the 1970s. What is hard is general problem solving, which probably is AI-complete. But we can expect more and more tools to support programmers and to take over more and more routine tasks. Look at Intellisense and Interface builder, or model-driven software development. --Stephan Schulz (talk) 19:54, 12 June 2017 (UTC)


 * I don't think AIs will need to generate code, that's looking at the situation the wrong way.
 * The point would be that you train an AI to do a task that you would otherwise have to write a lot of code for. (Not that the AI would write actual code and then compile it.)
 * ApLundell (talk) 16:34, 13 June 2017 (UTC)


 * I don't think we're all that far from being able to use AI to generate workable programs. However I get the horrible feeling that for at least the first fifty years they will produce things like Microsoft Word, great big piles of steaming ****. It has no real thought behind it any more if it ever did have originally, it just has lots of coding to cope with what lots of different problems usability teams have found. And for a lot of people that is okay, they have no feeling for how a machine might work. They learn how to do the straightforward things okay and they get a few tricks from gurus for special things they want. If that is the product of highly paid programmers are we really entitled to expect better from an AI? Dmcq (talk) 09:48, 16 June 2017 (UTC)

Rocket leauge
Rocket leauge is the game which was released in 2016 and it was developed by Psionix. You can play this game on any console or on computer. One match has 5 minutes and it´s played with football ball. Team which score more goals against other team won the game. In Rocket leauge are those modes: Duel(1v1), Doubles(2v2), Standard(3v3), Chaos(4v4), Snow day(3v3, played with puck), Rocket labs(3v3, experimental maps), Hoops(2v2, played like Basketball). When you play competitive you can gain some rank for each mode when you have played 10 matches. In every season which resets every half of year developers add some new ranks and the old ranks they´ll just delete. Today is season 3 so there are these ranks: Bronze I,II,III -> Silver I,II,III -> Gold I,II,III -> Platinum I,II,III -> Diamond I,II,III -> Champion I,II,III -> Grand champion. Also when new season starts theres big tournament named RLCS(Rocket leauge championship series) with prize pool about 300,000$(Season 3 prize pool). RLCS is played in gamemode 3v3. There´re also some pro teams like Mock-it esports, G2, Flipsid3 tactics, Norther gaming. — Preceding unsigned comment added by 95.102.174.204 (talk) 12:15, 11 June 2017 (UTC)


 * Rocket League is enjoyed by many, and we have a decent article on it. I don't see you asking any questions though. If you have a question, please ask it. This is a reference desk, not a place to discuss or promote video games. SemanticMantis (talk) 20:24, 11 June 2017 (UTC)

.apk¬3
Which "english" to "spanish" as well as "spanish" to "english" dictionary is used by many that does not require an internet connection while using a Smart Phone? 43.245.120.76 (talk) 18:29, 11 June 2017 (UTC)
 * Google Translate will support off-line translation - you will need to download the app, and then in the app download both the English and Spanish dictionaries. After than you can turn off mobile data, but still be able to translate between these languages. LongHairedFop (talk) 21:16, 12 June 2017 (UTC)