ljvmiranda921 / seagull Goto Github PK
View Code? Open in Web Editor NEWA Python Library for Conway's Game of Life
Home Page: https://pyseagull.readthedocs.io/en/latest/index.html#
License: MIT License
A Python Library for Conway's Game of Life
Home Page: https://pyseagull.readthedocs.io/en/latest/index.html#
License: MIT License
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 !
Well, you dont want to encode all Lifeforms in your program. Maybe what you can do is add a function that scrapes LifeWiki, figures out the combination, and run it in your system
Use Azure Pipelines, try to integrate it with coveralls, twine, mypy, and pytest
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?
In the Lifeforms documentation below, it would be nice if we can expound further the description of some Lifeforms. It may be nice to link it to its corresponding description in LifeWiki: https://pyseagull.readthedocs.io/en/latest/api/seagull.lifeforms.html
Instead of binary values, maybe it's possible for each cell to have N values?
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))
A rock paper scissors automaton: green with at least 3 blue neighbours becomes blue, likewise blue becomes red, red becomes green.
-- https://twitter.com/AndrewM_Webb/status/1236274167437197320
You should be able to capture these since it's a given standard.
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
I have one below concern:
In case there are 3 connections in the same origin-host want to connect to the Seagull server, does seagull support it and can select any link available?
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.
Let's add one of the most popular formats used in LifeWiki!
Format description: https://www.conwaylife.com/wiki/Run_Length_Encoded
We can probably update on the following places:
It should just maintain a copy of it. Or, set a trigger that determines if the changes should be done inplace or not
@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.
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?
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
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.