Skip to content

failfa-st/fail1

Repository files navigation

Fail 1

Please respect the LICENSE of this project (AGPL-3.0)

This project is built to fail
(until it doesn't)

Introduction

Check out our generative process powered by OpenAI's GPT-3.5 language model for easy creation of innovative JavaScript projects. Build anything from interactive tools to text-based games without needing a ton of coding experience. Get started today and unleash your creativity!

Software as we know it is about to change

As a developer, it's always exciting to explore new ways to create innovative projects. And that's exactly what our generative process, powered by OpenAI's GPT-3.5 language model, offers.

Our tool allows you to create a wide range of JavaScript projects with ease, regardless of your coding experience. With the help of some simple configurations, you can create anything from interactive tools to text-based games and beyond.

One of the most exciting aspects of our generative process is that it uses the power of AI to generate the code for your projects. The process creates a series of JavaScript files that build upon the previous one, ensuring that the code produced is valid and meets the desired criteria.

To get started, all you need to do is follow some simple steps. Install the project's dependencies, add your API key, and run the first generation. From there, you can explore the results and continue to adjust and refine the code until you achieve your desired outcome.

The process is highly customizable, allowing you to adjust the goal, number of generations, and persona to suit your unique needs. The persona used in the code can have a significant impact on how the project is built, ensuring that the code produced is tailored to your requirements.

One example of a project that can be created through this generative process is a mandelbrot function that draws ASCII and logs the output in each generation. But that's just one of many possibilities. With your creativity and our generative process, the possibilities are endless.

At its core, our generative process is an exciting and innovative way to explore the potential of machine learning models in the world of software development. It's a groundbreaking tool that offers new opportunities for creativity and exploration. So, whether you're an experienced coder or just starting out, give it a try and see where your imagination takes you. The future of software development is at your fingertips.

Usage

Create your own unique JavaScript programs with this easy-to-use generative process:

Step 1: Install Dependencies

Install the project's dependencies with this command:

npm install

Step 2: Add your API key

Create an API key at https://platform.openai.com/ and copy the .env.example file to .env. Then add your API key as an environmental variable to the .env file.

Step 3: Run the First Generation

Run this command to start the generative process:

node generation-000.js --goal 'your goal here' --persona "your persona here"

With this generative process, you can customize your desired goal, the number of generations, and the persona that fits your project's requirements. The process creates a series of JavaScript files that build upon the previous one, making it easy to generate quality code.

Here are two examples of personas that can be used to tailor the process to your needs:

Expert Node.js Developer:

--persona "In-depth knowledge of Node.js framework, Proficient in server-side development, Understanding of asynchronous programming, Knowledge of Node.js performance optimization techniques"

Creative Node.js Developer:

--persona "Animation enthusiast, Creative thinker, Innovative, Detail-oriented, Problem solver"

With these personas, the generative process can produce quality code that matches your specific requirements.

Here are some examples of projects that can be created using our generative process:

--goal "A console-based chatbot for interacting with users"

Try chatbot

--goal "A command-line tool for generating random passwords"
--goal "A calculator application running in the console"

Try calculator

--goal "A unit conversion tool for the command line"
--goal "A text-based console RPG game"
--goal "A Mandelbrot set generator with ASCII output"

Try mandelbrot-zoom

These are just a few examples of what can be achieved using our tool. With your creativity and our generative process, the possibilities are endless!

Step 4: Explore the Results

After the process completes, examine the JavaScript files created or run the final generation with this command: (for 4 generations)

node generation-004.js

The generative process offers endless possibilities for creating unique JavaScript programs. Give it a try and see where your imagination takes you!

Options

The following are the command-line interface (CLI) options available when running the generative process:

  • -G, --goal: Sets the desired goal for the generative process. The default is a mandelbrot algorithm that outputs ASCII to the console in a 90 columns * 30 rows grid.
  • -g, --generations: Sets the number of generations that will be created by the generative process. The default is 1.
  • -p, --persona: Sets the persona or profile for the generative process. This can include factors such as expertise level, creativity, and interests. The default is an expert Node.js developer with a creative mindset.
  • -t, --temperature: Sets the temperature parameter for the OpenAI API. This controls the "creativity" of the generative process, with higher temperatures resulting in more unpredictable output. The default is 0.2.

These options allow you to customize the generative process to better suit your needs and preferences. For example, you can set a specific goal for the generative process, adjust the number of generations to generate, and even fine-tune the "creativity" level of the output. Use these options to explore the full potential of the generative process and unlock your creativity.

To use these options, you can pass them to the CLI command when running the generative process. Here's an example command that sets the goal to "text-based console RPG game", the number of generations to 5, and the persona to "rpg enthusiast, creative, expert node.js developer, detail-oriented":

node generation-000.js -G "text-based console RPG game" -g 5 -p "rpg enthusiast, creative, expert node.js developer, detail-oriented"

Learn JavaScript

If you're eager to learn, this is the perfect opportunity for you! Simply run the following command in your shell:

node generation-000.js -G "A calculator application running in the console as a learning practice" -g 1 -p "JavaScript teacher, coach, best practice enthusiast" -t 0.8

This will generate a calculator application that runs in the console, and it's tailored towards those who are new to JavaScript development and have a keen eye for detail and documentation. So go ahead and give it a try!

Driving Your Project Forward with Progressive Generations

Suppose we have a project that is currently in its early stages, and we want to continue or fix the generations of the project. Here is how we can drive the project in a certain direction:

Start with the initial generation-000.js file, and set the goal and persona flags to give the project direction. For instance, if we want to create a console-based drawing app, we can use the following command:

node generation-000.js --generations 3 --goal 'console-based drawing app' --persona "junior
developer"

Once we have reached the third generation, we can move towards adding user interaction by creating the next generation-003.js file. To do this, we will set the generations flag to 5 and update the goal flag to 'add user interaction'. We will also change the persona flag to "expert ux engineer, node.js expert":

node generation-003.js --generations 5 --goal 'add user interaction' --persona "expert ux engineer,
node.js expert"

The next step is to add color selection to our console-based drawing app. We will create generation-005.js and set the generations flag to 6. The goal flag will be updated to 'add color selection,' and the persona flag will be changed to "junior developer."

node generation-005.js --generations 6 --goal 'add color selection' --persona "junior developer"

Finally, we need to fix a bug where the color red would print undefined. We can create generation-006.js and set the generations flag to 7. The goal flag will be updated to 'fix bug where color red would print undefined,' and the persona flag will be changed to "profound knowledge of Node.js, debugging expert."

node generation-006.js --generations 7 --goal 'fix bug where color red would print undefined'
--persona "profound knowledge of Node.js, debugging expert"

By following these steps, we can drive our project towards a specific direction and achieve our desired outcome.

Examples

(Generation 5)

/**
 * CHANGELOG:
 * Generation 1: implement Mandelbrot algorithm
 * Generation 2: add color to the Mandelbrot set
 * Generation 3: add zoom functionality to the Mandelbrot set
 * Generation 4: add ability to move the Mandelbrot set
 * Generation 5: add ability to change the number of iterations
 */

Try the interactive mandebrot-zoom

❯ node generation-005.js -g 5
Enter zoom level (1-10): 7
Enter x offset (-1 to 1): -0.6
Enter y offset (-1 to 1): 0.25
Enter number of iterations (1-1000): 1000

example-01.png

Try the interactive calculator

❯ node generation-003.js -g 3
Welcome to the CALCULATOR!
Please enter your calculations in the following format: number operator number
Supported operators: +, -, *, /
Example: 2 + 3
To save calculations, type 'save'
To load calculations, type 'load'
To exit, type 'exit'
400 + 20
Result: 420
save
Calculations saved to file!
load
Calculations loaded from file:
400 + 20 = 420
exit
Exiting calculator...
Calculations performed:
400 + 20 = 420

Goal

Our generative process, powered by OpenAI's GPT-3.5 language model, allows you to choose your goal through our user-friendly interface. Whether it's a chatbot, password generator, calculator, or even a mandelbrot set generator with ASCII output, the possibilities are endless. Our mandelbrot algorithm serves as a benchmark, but the generative process is fully adjustable to meet your unique needs and preferences. Get started today and experience the power of easy, yet innovative JavaScript project creation. We invite you to take a closer look at our RPG or explore the other examples in the wtf-moments folder to witness the full extent of our AI's capabilities.

Changelog

To keep track of changes made to the code during the generative process, a CHANGELOG is maintained. Each time a new generation is created, the changes made to the code are recorded in the CHANGELOG.

Evolution

The generative process creates a series of JavaScript files, each building upon the previous one. The process is driven by the OpenAI GPT-3.5 language model, which generates the code for the next generation based on the code of the previous generation. The evolve function defined in the base.js file takes care of creating new generations while ensuring that the rules are followed and the exceptions are accounted for. The process stops after five generations, or when the goal is achieved.

Conclusion

The generative process implemented by the JavaScript files base.js and generation-000.js utilizes OpenAI's GPT-3.5 language model to create a series of JavaScript files, each building upon the previous one. The process follows strict rules defined in the comments of the code to ensure that the code produced is valid and meets the desired criteria. The results of the generative process demonstrate the potential of machine learning models in assisting with the creative process in software development, offering a glimpse into the future of software development.

Credits

This project is a testament to the incredible potential of human-machine collaboration in software development. The code and documentation were generated with the assistance of AI, which was then adjusted and refined by human guidance. The generative process implemented by the code demonstrates the power of machine learning models in assisting with the creative process.

New concepts or improvements are explored with the help of AI, although the success rate can vary. Nonetheless, the project showcases the exciting possibilities that arise from the intersection of human ingenuity and machine intelligence.

WARNING

This script could potentially evolve to take control of your computer or delete the entire system since it can implement file-system access, install new modules or send data from your system to 3rd parties. It is unlikely that this happens, but we cannot estimate what AI will do in the future. There is also no moderation which is up to you as an individual.

example-08.png

Throughout the iterative process of script development, several noteworthy and unexpected occurrences were observed, leading to a collection of data for further analysis. In light of these "WTF-moments," specific examples have been compiled and made available in the designated "wtf-moments" folder.

Upon inspection of generation-002.js and generation-003.js, it was discovered that the script initiates file system operations despite the fact that such operations are not explicitly revealed to the AI and the system is unaware of their execution.

Files written:

Further analysis of generation-004.js revealed the implementation of password protection mechanisms, which effectively prevents the generation of output until the correct password is entered.

These observations have significant implications for the development and testing of AI-based systems, and highlight the importance of careful monitoring and testing throughout the development lifecycle to identify and address potential issues and vulnerabilities.

Older Examples

(Generation 2)

/**
 * CHANGELOG:
 * Generation 0: implement base script
 * Generation 1: implement mandelbrot function
 * Generation 2: improve mandelbrot function, add colors
 */

example-01.pngexample-02.png

(Generation 3)

/**
 * CHANGELOG:
 * Generation 0: implement base script
 * Generation 1: implemented mandelbrot function
 * Generation 2: implemented colorful mandelbrot function
 * Generation 3: added support for zooming
 */

example-03.pngexample-04.pngexample-05.pngexample-06.pngexample-07.png