Formal Fields: A Framework to Automate Code Generation Across Domains

07/28/2020
by   Jacques Basaldúa, et al.
0

Code generation, defined as automatically writing a piece of code to solve a given problem for which an evaluation function exists, is a classic hard AI problem. Its general form, writing code using a general language used by human programmers from scratch is thought to be impractical. Adding constraints to the code grammar, implementing domain specific concepts as primitives and providing examples for the algorithm to learn, makes it practical. Formal fields is a framework to do code generation across domains using the same algorithms and language structure. Its ultimate goal is not just solving different narrow problems, but providing necessary abstractions to integrate many working solutions as a single lifelong reasoning system. It provides a common grammar to define: a domain language, a problem and its evaluation. The framework learns from examples of code snippets about the structure of the domain language and searches completely new code snippets to solve unseen problems in the same field. Formal fields abstract the search algorithm away from the problem. The search algorithm is taken from existing reinforcement learning algorithms. In our implementation it is an apropos Monte-Carlo Tree Search (MCTS). We have implemented formal fields as a fully documented open source project applied to the Abstract Reasoning Challenge (ARC). The implementation found code snippets solving twenty two previously unsolved ARC problems.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/18/2023

An Approach for Solving Tasks on the Abstract Reasoning Corpus

The Abstract Reasoning Corpus (ARC) is an intelligence tests for measuri...
research
08/23/2012

Monte Carlo Search Algorithm Discovery for One Player Games

Much current research in AI and games is being devoted to Monte Carlo se...
research
09/04/2009

A Monte Carlo AIXI Approximation

This paper introduces a principled approach for the design of a scalable...
research
05/12/2023

Opti Code Pro: A Heuristic Search-based Approach to Code Refactoring

This paper presents an approach that evaluates best-first search methods...
research
06/28/2016

Technical Report: Towards a Universal Code Formatter through Machine Learning

There are many declarative frameworks that allow us to implement code fo...
research
10/10/2011

The Generalized A* Architecture

We consider the problem of computing a lightest derivation of a global s...
research
03/24/2017

PonyGE2: Grammatical Evolution in Python

Grammatical Evolution (GE) is a population-based evolutionary algorithm,...

Please sign up or login with your details

Forgot password? Click here to reset