generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Best way for computer to write Lua code

Previous Thread :: Next Thread 
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
24 Aug 2012 02:44 PM
What would be the best way to make a program generate code which performs a certain task? What sort of formalizations / limitations would be necessary?
How would it go about actually solving the problem, evolutionary systems, proof-based systems, bruteforce? How can it evaluate whether or not a solution works?

'just want an open discussion, specifically in this case regarding the generation of Lua code.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
24 Aug 2012 02:52 PM
Finding a way to hack in to Stack Overflow's databases, getting the emails of every programmer and spamming their inboxes with messages asking for code to do this or that, and then getting the answer and running that code and determining if it produced the expected result.
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
24 Aug 2012 02:53 PM
Mhm. Can you please elaborate what you are trying to say, I get it, and yet I don't. I get it too little to understand it :(

Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
24 Aug 2012 02:57 PM
Telling a program, 'I need a function/program which does this', and then it giving you the code which does what you told it to. What might be the specifics of accomplishing that goal, and what sorts of things could be done relatively easily? How would you phrase the goal of the program to the computer? etc
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
24 Aug 2012 03:00 PM
That sir, is a very good question.
Let me think about it, because my current theories are a bit, uhm....'unfinished'...
Report Abuse
myrkos is not online. myrkos
Joined: 06 Sep 2010
Total Posts: 8072
24 Aug 2012 03:01 PM
Perhaps having a bunch of inputs with desired outputs you could use some genetic algorithm to basically produce the desired program through "evolution". It would be hard to do this with Lua, though, and can take a while.
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
24 Aug 2012 03:03 PM
^
This is what I was thinking about, tough I was more in to the memory things....
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
24 Aug 2012 03:04 PM
You'd need to make a fairly ambiguous interpreter to convert a whole dictionary of words into instructions for coding. Taking English apart would be required... You'll need to find some cases of what to do in the case of some major ambiguity (like vague statements) and then choose a standard course of action for it.

I'm guesstimating that making a "learning" program would be better so that it will pick up stuff over time. Distribute to a large group of trusted individuals to teach it English.
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
24 Aug 2012 03:10 PM
myrkos: Generating tree type structures would work for some things, but for example, what if you wanted to generate the list of primes?
Formally defining a prime as a number such that no integer {x|x>1} p % x == 0 would mean it's relatively trivial for a computer to check primality, and then given more information about which number is the 'first' prime it's very simple for it to make a very slow way to generate this.
Evolving a tree to do that, depending on what it can do, would take an incredibly long time, or possibly never accomplish it (if the grammar isn't expressive enough).
Often, when tree type function applications aren't enough to do things, you can turn to other easily evolvable formats, but the only one I know of is assembly, and that would take a very long time indeed to do, especially since Lua isn't assembly. Writing an interpreter, or modifying Lua, would make it easier.

aboy: I explicitly said that you'd have to come up with a formal grammar. English is obviously unsuitable.
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
24 Aug 2012 03:12 PM
So you'd like to make a language that parses into Lua??? The task is infinitely simpler.
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
24 Aug 2012 03:28 PM
No, I didn't say that at all... and that doesn't simplify the problem, at all.
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
24 Aug 2012 03:30 PM
>the problem

What is this problem you are talking about? @Taslem
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
24 Aug 2012 04:01 PM
See "Declarative Programming".

Declarative programming is as close as we have to having a computer solve a program, where you state facts and relationships rather than sets of instructions.

For an example, see the Prolog language.

Report Abuse
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
24 Aug 2012 04:20 PM
just follow julien's advice

make it post on stackoverflow
Report Abuse
QuestionableJuggs is not online. QuestionableJuggs
Joined: 18 Jun 2012
Total Posts: 150
24 Aug 2012 04:37 PM
That would be an interesting experiment. Write a class of algorithms that post to different programming help websites and then do some kind of measured competition to see which bot comes out better from the help it receives.
Report Abuse
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
25 Aug 2012 06:21 AM
oh god imagine the terror a program like that would bring?
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
25 Aug 2012 06:39 AM
An off topic thought here, but I can't help but wonder if Stravant would seem half as informed without access to the internet, or if he simply knows everything.
Report Abuse
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
25 Aug 2012 05:36 PM
stravant obviously knows everything

how dare you question his knowledge! guards, arrest him and take him to the dungeons!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image