Changeset 1087 for framspy/FramsticksLib.py
- Timestamp:
- 02/19/21 03:14:41 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/FramsticksLib.py
r1084 r1087 8 8 9 9 class FramsticksLib: 10 """Communicates directly with Framsticks DLL/SO.10 """Communicates directly with Framsticks library (.dll or .so). 11 11 You can perform basic operations like mutation, crossover, and evaluation of genotypes. 12 12 This way you can perform evolution controlled by python as well as access and manipulate genotypes. … … 14 14 or access and control the simulation and simulated creatures step by step. 15 15 16 You need to provide one or two parameters when you run this class: the path to Framsticks CLIwhere .dll/.so resides17 and the name of the Framsticks dll/so (if it is non-standard). See::16 You need to provide one or two parameters when you run this class: the path to Framsticks where .dll/.so resides 17 and, optionally, the name of the Framsticks dll/so (if it is non-standard). See:: 18 18 FramsticksLib.py -h""" 19 19 … … 26 26 27 27 def __init__(self, frams_path, frams_lib_name): 28 frams.init(frams_path, frams_lib_name, "-Ddata") # "-D"+os.path.join(frams_path,"data")) # not possible (maybe python windows issue) because of the need for os.chdir(). So we assume "data" is where the dll/so is 28 if frams_lib_name is None: 29 frams.init(frams_path) # could add support for setting alternative directories using -D and -d 30 else: 31 frams.init(frams_path, "-L" + frams_lib_name) # could add support for setting alternative directories using -D and -d 29 32 30 33 print('Available objects:', dir(frams))
Note: See TracChangeset
for help on using the changeset viewer.