5 ms·
Python's context-sensitive grammar makes it a particularly unsuitable target for text-based generation of code in this manner. If you continue with this project
by RodgerTheGreat 10y ago
Python's context-sensitive grammar makes it a particularly unsuitable target for text-based generation of code in this manner. If you continue with this project I expect you will find you get far better results from generating ASTs or choosing a language with a simple grammar in which most possible compositions of tokens are valid.
- jasikpark 10y agoSo... some form of lisp would probably be best, right? Or maybe just binary or assembly?
- woah 10y agoRead the article, these type of algorithms have an easy time with syntax. The real issue is that the code produced is meaningless.
- kordless 10y ago> The real issue is that the code produced is meaningless. Sounds like something I'd code up.
- deleted 10y ago[deleted]
- dasboth 10y agoExactly, the difficulty is not really in producing valid code but meaningful code. Same with text generation - while a recurrent neural network might produce grammatically correct sentences, I don't think we're close to it producing an story with an actual plot, discernible characters etc.
- deleted 10y ago[deleted]
- iandanforth 10y agoWhat about a statically analyzable language? That could be factored into the loss function.
- king_phil 10y agoI was thinking the same. Not only that, if you would add multiple networks that, for example, weigh the possibility that a full line is "good" code, and another that evaluates a whole block (like google deep mind did with AlphaGo) so it looks like dense and complex code this could be a nice program trolling with pull requests on github :-D