Download the PHP package hashbangcode/webolution without Composer

On this page you can find all versions of the php package hashbangcode/webolution. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package webolution

Webolution

An experimental set of classes that attempts to put together an application that will evolve a webpage. This is intended to be a test application that allows me to learn the techniques involved in genetic algorithms as well as how to to put together a modern PHP application with composer. As a result things might change significantly without warning.

I'm interested in finding out if anyone has looked at this code or has any suggestions for improvement. Please get in touch via the issue queue and let me know.

Requirements

Structure

The application is structured into different types of objects in order to ensure separate concerns.

Types

The types classes take care of the data types at the core of the evolution process. At it's core a Type class only cares about the data that it contains. Type classes do not have functionliaty to perform mutations or calculate fitness metrics, this is the domain of Individual classes.

Individuals

Individual classes provide mutation and fitness functionality for Type classes. Instead of extending the types they wrap them as a parameter. Individual classes can be regarded as decorators of the Type classes. Each Type class maps to an Individual class.

Populations

The Population class provides a collection of Individuals.

Evolution

An Evolution class is used to control the process of evolution. This ties together the Population, Individual and Type classes and controls each generation of Population objects. An EvolutionStorage class has been created to allow larger number of Individuals to be evolved at once using a database as a storage engine.

Types Detail

The following details each of the types and any interactions they have with other types.

Number

Defines a class that contains a number. The NumberType class can add or subtract from this number. It was created as a very simple initial type in order to test the functionality of the evolution process.

Text

Defines a class that contains a string. The class has functions to get or set the string.

Color

Defines a class that contains information about a color. This is stored internally by the RGB value of the color.

Image

This defines a 2 dimensional array that renders out into an image. The array consists of either “on” or “off” values, which are then used to create a grid of boxes in an image.

Element

This represents a HTML element. The core property is the element type (div, p, strong etc) and one or more attributes. The attributes can be used to give the elements a class or id, although any attribute is allowed. An Element object can also contain one or more child Element objects, which creates a hierarchical structure of Elements.

Unit

The Unit is an object that holds information about a measurement in CSS. This is represented by a number and a unit of measurement. So values like 10px, 10em, 10% can exist. A special value of ‘auto’ can also be represented.

Style

This defines an object that contains information about a CSS rule set against a single element. The class contains a selector property and an attributes property that combine together to form a CSS block.

Page

A Page brings together the Style and Element classes into a page structure. The use of the Page class allows the basic HTML structure of a page to be static whilst the elements and styles within it can change.

The Evolution Process

The following describes how the process of evolution works for each generation.

Culling

To start the evolution process a certain amount of the population is removed. The chances of an individual being removed are dependent of the fitness of the individual. Individuals with a high fitness are less likely to be removed.

Replicate

The existing individuals in the population are then replicated to bring the population number back to a designated minimum. This means that the current population will contain the fittest individuals.

Mutate

The population is then randomly mutated. How the population is mutated is dependent on the type of object being used. After the population has been through the mutation cycle the population can then go through a crossover cycle. This is where individuals are mixed together and their attributes are swapped.

Generate Statistics

Any statistics for the population are then calculated.

Storage

This action clones the population into an array to that it can be retrieved later. This is important when looking through the history of the population.

Next steps

Some things that need to happen.

Future plans


All versions of webolution with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ramsey/uuid Version ^4.0
fakerphp/faker Version ^1.17
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hashbangcode/webolution contains the following files

Loading the files please wait ....