AgentElement / alchemy-reimplemented

A reimplementation of Walter Fontana's Algorithmic Chemistry (AlChemy)
GNU General Public License v3.0
1 stars 1 forks source link

Attempt Python Wrapper #4

Open colemathis opened 1 month ago

colemathis commented 1 month ago

Let's try a first attempt at a python wrapper and guess how much time it'll take to do it properly.

~~Step 0. Read about the difference between PyO3 and setuptools-rust. How are these related? Do we need to chose one or are they different tools? Step 1. Wrap a basic object (e.g. string, int etc) Step 2. Wrap a Soup object.~~

colemathis commented 1 month ago

Ignore the above.

The classes we need to wrap:

Methods:

Python Functions:

colemathis commented 1 month ago

A typical simulation will look like this


# Set seed and generate expressions
generator.seed()
expressions = generator.generate(N)

# Make a Soup class and evolve it
my_soup = Soup(...).push(expressions)
my_tape = reactor.react(N_collisions)

tape_data = my_tape.save()

# Analyze or save data