Git Product home page Git Product logo

pcgrl-brush's Introduction

RL Brush

https://rlbrush.app/

Usage

For full instructions on how to use RLBrush, checkout the Instructions document

Setup

yarn install
yarn start

Once this is running, the dev server can be accessed via browser at:

http://localhost:3000/

This project was bootstrapped using create-react-app. You can see the other readme for it at cra-README.md with more instructions.

Python Setup

Python files in this repo are all namespaced under the py/ subdirectory.

  1. Clone PCGRL Gym repo to a directory outside of this repo:
git clone https://github.com/amidos2006/gym-pcgrl
  1. pip install the gym-pcgrl package:
cd /path/to/gym-pcgrl
pip install -e .
  1. Switch back to py/ in this repo.

  2. Test your environment by running test-env.py.

Contributing

  1. Make a branch from master and add your changes:
git checkout master # switch to master branch
git pull origin master # sync up with remote
git checkout -b your_branch_name # make your new branch

# make changes
git add -A . # add your changes
git commit -m "description of your changes"
git push origin your_branch_name
  1. Using this branch, open a pull request on Github (Instructions here)

  2. Make sure pull request status checks pass and the group gets a heads up.

  3. Merge your pull request. Ideally, try to use the Squash and Merge feature to consolidate all your commits into 1 before merging.

squash

Development Guide

Layout

The layout of the UI can be generally updated using the src/Layout/styles.css file. This can be used to adjust the spacing between each section.

By uncommenting all the background colors, spacing issues can be more easily debugged:

Components

Each component is located in the src/ directory and given its own folder. Each folder contains an index.tsx and a styles.css file to describe the TypeScript and CSS respectively.

Icons

All icon files are available in the src/Icons directory but they are not all componentized. They are from a library available here:

https://icomoon.io/#icons

To componentize an icon simply add a component for it in src/Icons/index.tsx. Example:

// Define a unique constructor name starting with Icon
import { ReactComponent as IconFoo } from "./000-foo.svg";

// ...
function Icon(props: IconProps) {
    const iconProps = {
        // ...
    };
    switch (props.iconName) {
        case "pencil":
            return <IconPencil {...iconProps} />;
        case "foo-unique-name": // give the icon a unique name
            return <IconFoo {...iconProps} />; // return its component
        default:
            // This is basically an unsupported icon
            return <div>{"UNSUPPORTED ICON: ${iconName}"}</div>;
    }
}

Services

Services are ways to encapsulate our utility classes in a convenient place. Example:

export class MyUtilityService {
    public someMethodOfTheService() {
        // ...
    }

    public static someStaticMethodOfTheService() {
        // ...
    }
}

AppStateService

The src/services/AppState service scaffolds and manages the setup of the global application state.

Numeric

The src/services/Numeric service manages math operations, data structure creation etc.

TensorFlowService

TensorFlow operations live inside src/services/TensorFlow as stateless functions in the TensorFlowService class. This allows for separation of concerns and makes them easily usable anywhere else in the code without much boilerplate.

pcgrl-brush's People

Contributors

omardelarosa avatar mr4739 avatar amidos2006 avatar dependabot[bot] avatar

Stargazers

Tijn Kersjes avatar  avatar Yetman avatar M Charity avatar  avatar daybreak avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

tkers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.