Code Monkey home page Code Monkey logo

seagull's People

Contributors

ahoward-cf avatar altazur avatar asadafasab avatar dependabot[bot] avatar eugenpt avatar ljvmiranda921 avatar mushguys avatar richanawani avatar theodumont avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seagull's Issues

An animation render question

Dear developer
I have coloned your Python library to "D:/seagull" in my PC , and installed the components mentioned in the README.md file . Then I opened "D:/seagull" with VSCode and add an Python file named "new_life.py" in "D:/seagull" . After that , I added the code you have showed in READMD.md like:

import seagull as sg
from seagull.lifeforms import Pulsar

board = sg.Board(size=(19,60))  


board.add(Pulsar(), loc=(1,1))
board.add(Pulsar(), loc=(1,22))
board.add(Pulsar(), loc=(1,42))

sim = sg.Simulator(board)      
sim.run(sg.rules.conway_classic, iters=1000)

sim.animate()

For showing the result , I also added the 'sim.animate' at the end of the file . But after that , when I run "D:/seagull/new_life.py" with VSCode , the terminal showed:

d:/programe_for_large/anaconda3/python.exe d:/seagull/new_life.py

2021-02-20 23:12:00.686 | INFO | seagull.simulator:compute_statistics:128 - Computing simulation statistics...

2021-02-20 23:12:00.746 | INFO | seagull.simulator:animate:183 - Rendering animation...`

And after that no window popped out , I couldn't see the same result you showed in README.md . Did I misunderstand the function of your library or anything I do wrong during my action ? Thank you so much !

Does Seagull support to continue to run the scenario in case the connection is re-established?

Currently, my team are using Seagull to support sending/receiving diameter traffic. Seagull plays a role as a diameter server, it will
receive the diameter messages and respond by corresponding ones. We have one concern below:
When the connection between the diameter client and the Seagull is re-established, does Seagull support to continue to run the scenario that we set at the beginning?

Generic board

Instead of binary values, maybe it's possible for each cell to have N values?

Add feature for relative paths

Not yet sure what's the best API for this, but ideally we should add the ability to add lifeforms relative to one another, instead of adding their coordinates explicitly. Might need to think of adding attributes such as anchor and offset (lol, can you count how many times I used the word "add"?)

board.add(my_lifeform, loc=(0,0))
board.add(another_lifeform, relative_to=my_lifeform, loc="below", offset=(0,1))

Add fun examples in the README

It would be nice to see what can be created from the Seagull library. Any fun examples of cellular automata that generates interesting interactions can be put into our examples gallery

Abstract how rules are defined

I think it's possible to just define a class called Rule that takes in a rulestring and has classmethods that returns a callable. A sample usage may be the following:

import seagull as sg

rule = sg.Rule(B=3, S=[2,3])    # Simulates Conway's rule
rule.apply                                 # A callable that you apply to the board

Thus, the implementation of sg.rules.conway_classic may be as simple as returning the apply method.

Most appropriate way to add Methuselah lifeforms

@ljvmiranda921 suggested a new issue for this would be appropriate.

I would like to add a couple of Methuselah lifeforms (namely Thunderbird and Century) but their nature makes it difficult to decide where best to place them.

  • Unlike oscillators, Methuselahs do not return to their initial state - thus they are unsuited to the oscillator class.
  • They decay into many smaller lifeforms, often mixtures of still life, oscillators, and spaceships - thus they are not still life lifeforms.
  • They generally require large canvases, and long integration times before they stabilize. This may require some thought as to how best to instantiate them.

As such, a new class/sub-class may be best. But in addition to the above, they are rarely used in combination with other lifeforms (as other lifeforms will disrupt the evolution towards the steady state). Would they be better as examples? Or as something entirely new?

Add new Lifeforms

We can definitely increase the number of our premade lifeforms in Seagull. I only started with a few, but in LifeWiki there seems to be a lot more!

Will need some help on this, any takers? You can add 1 or 2 from LifeWiki, I can help you along the way! https://conwaylife.com/wiki/Main_Page

How to start

Choose a fun Lifeform from LifeWiki: https://conwaylife.com/wiki/Main_Page then comment it here. Once I gave the go signal or a thumbs up 👍 , then just make a PR! You can simply copy how other Lifeforms were implemented in Seagull. I can guide you along the way!

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.