Code Monkey home page Code Monkey logo

alife_book_src's People

Contributors

lanasina avatar maru-n avatar sot528 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alife_book_src's Issues

docker anaconda3へのAlife環境インストールエラーにつきまして

お世話になります
Alifeのチュートリアルを参考にした環境構築で下記のようなエラーが出ます。
回避策ご教授いただけましたら幸いです。

OS ubunts16 64bit

docker pull continuumio/anaconda3
docker run -i -t continuumio/anaconda3 /bin/bash

git clone https://github.com/alifelab/alife_book_src.git

pip install pyglet pymunk vispy

cd alife_book_src
cd chap02
※ cd alife_book_src/chap02 とすると落ちました。

python game_of_life.py
以下エラーです。
Traceback (most recent call last):
File "game_of_life.py", line 7, in
from alifebook_lib.visualizers import MatrixVisualizer
File "../alifebook_lib/init.py", line 1, in
import vispy
ModuleNotFoundError: No module named 'vispy'

chap2/cellular_automaton_1d.pyのvisualizerの宣言位置

コードの9~10行目のWIDTHとHEIGHTの直後にVisualizerの宣言を持ってきた方がよいように思った。
なぜならWIDTHとHEIGHTはRule110のようなCA-orientedな変数ではなく、あくまでもビジュアライズのために用意する変数だから。その次にspace、その次にrule。そうしないとspaceのHEIGHTが(実際には無限ループなのに)時間を決めているようで気持ち悪い。

English translation for book and repository

Hello, I just learnt about your book and found the repository. I am very interested in ALife and would love to employ Python. Unfortunately I don't know more than just a few Japanese words, but would love to read your book.

In the meantime I will look at the code, but I also hope that you are willing to translate your book to more languages in the near future.

gray_scott.pyが動かない

お知恵をお借りしたく投稿させて頂きました。

■問題となっている現象に関して
第2章にある以下のコマンドを打つと、ウィンドウは出現するのですが、描画されません。
$ python gray_scott.py

実行後のターミナルは、以下のようになります。
repeatしてエラーを出し続けるので、Ctrl+C(KeyboardInterrupt)で強制終了しました。

―――――――――――――――――――――――――――――――――――――――――――

WARNING: Traceback (most recent call last):
File "gray_scott.py", line 53, in
visualizer.update(u)
File "..\alifebook_lib\visualizers\matrix_visualizer.py", line 36, in update
app.process_events()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\app_default_app.py", line 79, in process_events
return default_app.process_events()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\app\application.py", line 78, in process_events
return self._backend._vispy_process_events()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\app\backends_qt.py", line 222, in _vispy_process_events
app.processEvents()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\app\backends_qt.py", line 436, in event
out = super(QtBaseCanvasBackend, self).event(ev)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\app\backends_qt.py", line 708, in paintGL
self._vispy_canvas.events.draw(region=None)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\util\event.py", line 455, in call
self._invoke_callback(cb, event)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\util\event.py", line 475, in _invoke_callback
self, cb_event=(cb, event))
<< caught exception here: >>
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\util\event.py", line 471, in _invoke_callback
cb(event)
File "..\alifebook_lib\visualizers\matrix_visualizer.py", line 28, in _on_draw
self._render_program.draw(gloo.gl.GL_TRIANGLE_STRIP)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\program.py", line 470, in draw
canvas.context.flush_commands()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\context.py", line 170, in flush_commands
self.shared.parser.parse([('CURRENT', 0)])
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\glir.py", line 477, in parse
self._parse(command)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\glir.py", line 404, in _parse
self._gl_initialize()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\glir.py", line 502, in _gl_initialize
if this_version < '2.1':
File "C:\Users\SONY\Anaconda3\envs\alife\lib\distutils\version.py", line 52, in lt
c = self._cmp(other)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\distutils\version.py", line 335, in _cmp
if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
ERROR: Invoking <bound method MatrixVisualizer._on_draw of <alifebook_lib.visualizers.matrix_visualizer.MatrixVisualizer object at 0x0000021568F31F98>> for DrawEvent
WARNING: Traceback (most recent call last):
File "gray_scott.py", line 53, in
visualizer.update(u)
File "..\alifebook_lib\visualizers\matrix_visualizer.py", line 36, in update
app.process_events()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\app_default_app.py", line 79, in process_events
return default_app.process_events()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\app\application.py", line 78, in process_events
return self._backend._vispy_process_events()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\app\backends_qt.py", line 222, in _vispy_process_events
app.processEvents()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\app\backends_qt.py", line 436, in event
out = super(QtBaseCanvasBackend, self).event(ev)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\app\backends_qt.py", line 708, in paintGL
self._vispy_canvas.events.draw(region=None)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\util\event.py", line 455, in call
self._invoke_callback(cb, event)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\util\event.py", line 475, in _invoke_callback
self, cb_event=(cb, event))
<< caught exception here: >>
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\gl_gl2.py", line 269, in glCreateProgram
nativefunc = glCreateProgram._native
AttributeError: 'function' object has no attribute '_native'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\gl\gl2.py", line 72, in get_gl_func
func = getattr(lib, name)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\ctypes_init
.py", line 361, in getattr
func = self.getitem(name)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\ctypes_init
.py", line 366, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'glCreateProgram' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\util\event.py", line 471, in _invoke_callback
cb(event)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\context.py", line 171, in flush_commands
self.glir.flush(self.shared.parser)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\glir.py", line 232, in flush
self._shared.flush(parser)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\glir.py", line 146, in flush
parser.parse(self._filter(self.clear(), parser))
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\glir.py", line 477, in parse
self._parse(command)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\glir.py", line 417, in parse
self.objects[id] = klass(self, id
)
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\glir.py", line 546, in init
self.create()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\glir.py", line 600, in create
self._handle = gl.glCreateProgram()
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\gl_gl2.py", line 271, in glCreateProgram
nativefunc = glCreateProgram._native = _get_gl_func("glCreateProgram", ctypes.c_uint, ())
File "C:\Users\SONY\Anaconda3\envs\alife\lib\site-packages\vispy\gloo\gl\gl2.py", line 87, in _get_gl_func
raise RuntimeError('Using %s with no OpenGL context.' % name)
RuntimeError: Using glCreateProgram with no OpenGL context.
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x2156db1de80>> for DrawEvent
ERROR: Invoking <bound method MatrixVisualizer._on_draw of <alifebook_lib.visualizers.matrix_visualizer.MatrixVisualizer object at 0x0000021568F31F98>> repeat 2
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x2156db1de80>> repeat 2
ERROR: Invoking <bound method MatrixVisualizer._on_draw of <alifebook_lib.visualizers.matrix_visualizer.MatrixVisualizer object at 0x0000021568F31F98>> repeat 4
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x2156db1de80>> repeat 4
ERROR: Invoking <bound method MatrixVisualizer._on_draw of <alifebook_lib.visualizers.matrix_visualizer.MatrixVisualizer object at 0x0000021568F31F98>> repeat 8
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x2156db1de80>> repeat 8
ERROR: Invoking <bound method MatrixVisualizer._on_draw of <alifebook_lib.visualizers.matrix_visualizer.MatrixVisualizer object at 0x0000021568F31F98>> repeat 16
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x2156db1de80>> repeat 16
ERROR: Invoking <bound method MatrixVisualizer._on_draw of <alifebook_lib.visualizers.matrix_visualizer.MatrixVisualizer object at 0x0000021568F31F98>> repeat 32
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x2156db1de80>> repeat 32
ERROR: Invoking <bound method MatrixVisualizer._on_draw of <alifebook_lib.visualizers.matrix_visualizer.MatrixVisualizer object at 0x0000021568F31F98>> repeat 64
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x2156db1de80>> repeat 64
ERROR: Invoking <bound method MatrixVisualizer._on_draw of <alifebook_lib.visualizers.matrix_visualizer.MatrixVisualizer object at 0x0000021568F31F98>> repeat 128
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x2156db1de80>> repeat 128
Traceback (most recent call last):
File "gray_scott.py", line 44, in
np.roll(u, 1, axis=1) + np.roll(u, -1, axis=1) - 4u) / (dxdx)
KeyboardInterrupt

■OS, python, モジュールなどの実行環境に関して
以下をターミナルから実行し、出力された各種環境情報です。
$ python -c "import vispy; print(vispy.sys_info())"

―――――――――――――――――――――――――――――――――――――――――――

Platform: Windows-10-10.0.17134-SP0
Python: 3.6.7 |Anaconda, Inc.| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)]
NumPy: 1.15.4
Backend: PyQt5
pyqt4: None
pyqt5: ('PyQt5', '5.9.2', '5.9.6')
pyside: None
pyglet: None
glfw: None
sdl2: None
wx: None
egl: None
osmesa: None
_test: None

GL version: ''
MAX_TEXTURE_SIZE: ()
Extensions: ''

―――――――――――――――――――――――――――――――――――――――――――

また、他のパッケージのバージョン情報です。

―――――――――――――――――――――――――――――――――――――――――――

packages in environment at C:\Users\SONY\Anaconda3\envs\alife:

Name Version Build Channel

_tflow_select 2.2.0 eigen
absl-py 0.6.1 py36_0
astor 0.7.1 py36_0
blas 1.0 mkl
ca-certificates 2018.03.07 0
certifi 2018.10.15 py36_0
freetype 2.9.1 ha9979f8_1
gast 0.2.0 py36_0
grpcio 1.14.1 py36h5c4b210_0
h5py 2.8.0 py36h3bdd7fb_2
hdf5 1.10.2 hac2f561_1
icc_rt 2017.0.4 h97af966_0
icu 58.2 ha66f8fd_1
intel-openmp 2019.1 144
jpeg 9b hb83a4c4_2
keras 2.2.4 0
keras-applications 1.0.6 py36_0
keras-base 2.2.4 py36_0
keras-preprocessing 1.0.5 py36_0
libpng 1.6.35 h2a8f88b_0
libprotobuf 3.6.1 h7bd577a_0
libtiff 4.0.9 h36446d0_2
markdown 3.0.1 py36_0
mkl 2018.0.3 1
mkl_fft 1.0.6 py36hdbbee80_0
mkl_random 1.0.1 py36h77b88f5_1
numpy 1.15.4 py36ha559c80_0
numpy-base 1.15.4 py36h8128ebf_0
olefile 0.46 py36_0
openssl 1.0.2p hfa6e2cd_0
pillow 5.3.0 py36hdc69c19_0
pip 18.1 py36_0
protobuf 3.6.1 py36h33f27b4_0
pyqt 5.9.2 py36h6538335_2
python 3.6.7 h33f27b4_1
pyyaml 3.13 py36hfa6e2cd_0
qt 5.9.6 vc14h1e9a669_2
scipy 1.1.0 py36h4f6bf74_1
setuptools 40.6.2 py36_0
sip 4.19.8 py36h6538335_0
six 1.11.0 py36_1
sqlite 3.25.3 he774522_0
tensorboard 1.12.0 py36he025d50_0
tensorflow 1.12.0 eigen_py36h67ac661_0
tensorflow-base 1.12.0 eigen_py36h45df0d8_0
termcolor 1.1.0 py36_1
tk 8.6.8 hfa6e2cd_0
vc 14.1 h0510ff6_4
vispy 0.5.3 py36hee6b756_0
vs2015_runtime 14.15.26706 h3a45250_0
werkzeug 0.14.1 py36_0
wheel 0.32.3 py36_0
wincertstore 0.2 py36h7fe50ca_0
yaml 0.1.7 hc54c509_2
zlib 1.2.11 h62dcd97_3

■その他環境に関して
CPUの情報を記載します。

Xoreax CPU Info

Vendor String GenuineIntel
Vendor Intel
Brand String Intel(R) Pentium(R) CPU P6200 @ 2.13GHz
Frequency 2128 MHz
Physical CPUs 1
Logical CPUs 2
CPU Cores (guess) 2
CPU Config (guess) Single CPU, Dual Core, No Hyperthreading

サンプルプログラムをColaboratoryで動かしたい

githubのディレクトリをColaboratory上にて!git clone https://github.com/alifelab/alife_book_srcで呼び出して、%run -i alife_book_src/chap02/gray_scott.pyで実行させようと試みているんですが、以下のようなエラーが出てしまいます。Colaboratory上で実行された方が居ましたら、是非ご教授願いたいです。
※一応エラーの通りにPyQt5はインストールしましたが、同様なエラーが出ます。

`---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/content/alife_book_src/alife_book_src/chap02/gray_scott.py in ()
5 sys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定
6 import numpy as np
----> 7 from alifebook_lib.visualizers import MatrixVisualizer
8
9 # visualizerの初期化 (Appendix参照)

/content/alife_book_src/alifebook_lib/init.py in ()
1 import vispy
----> 2 vispy.use('PyQt5')

/usr/local/lib/python3.6/dist-packages/vispy/util/wrappers.py in use(app, gl)
94 if app:
95 from ..app import use_app
---> 96 use_app(app)
97
98

/usr/local/lib/python3.6/dist-packages/vispy/app/_default_app.py in use_app(backend_name, call_reuse)
45
46 # Create default app
---> 47 default_app = Application(backend_name)
48 return default_app
49

/usr/local/lib/python3.6/dist-packages/vispy/app/application.py in init(self, backend_name)
47 self._backend_module = None
48 self._backend = None
---> 49 self._use(backend_name)
50
51 def repr(self):

/usr/local/lib/python3.6/dist-packages/vispy/app/application.py in _use(self, backend_name)
221 if not try_others:
222 # Fail if user wanted to use a specific backend
--> 223 raise RuntimeError(msg)
224 elif key in imported_toolkits:
225 # Warn if were unable to use an already imported toolkit

RuntimeError: Could not import backend "PyQt5":
No module named 'PyQt5'`

vispy実行時のSegmentation fault (コアダンプ)

最初のプログラムになります16頁「2.2.2 Gray-Scottモデル」のgray_scott.pyの実行で躓いております。アドバイスいただけますと助かります。

<環境>
Ubuntu 18.04.1 LTS
on VirtualBoxバージョン5.2.18r124319(Qt5.6.2)
on Windows 10 Home (10.0.17134ビルド17134)

ガイドに従いpipからpyglet pymunk vispy keras tensorflowパッケージをインストール。

<実行結果>
実行した結果下記コメント、コアを吐くエラーとなります。

$ python gray_scott.py
/home/yoshihiro/anaconda3/lib/python3.6/site-packages/vispy/visuals/isocurve.py:22: UserWarning: VisPy is not yet compatible with matplotlib 2.2+
warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")
Segmentation fault (コアダンプ)

<その他>
・実行環境の情報を取ろうと下記コマンドを実行しても同じくコアダンプが吐かれます。

$ python -c "import vispy; print(vispy.sys_info())"
Segmentation fault (コアダンプ)

・pip install matplotlib==2.1 としてmatplotlibのバージョンを下げて実行したところ、互換性に関するメッセージは出ないものの、やはりコアダンプを吐いて止まります。

$ python gray_scott.py
Segmentation fault (コアダンプ)

VisPy is not yet compatible with matplotlib 2.2+

python cellular_automata_1d.py
を実行しますと,(セルオートマトンの図が表示されますので多分正常に出力がなされていると思われますが)
次のような警告がterminalに表示されます.

/anaconda3/lib/python3.6/site-packages/vispy/visuals/isocurve.py:22: UserWarning: VisPy is not yet compatible with matplotlib 2.2+
warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")

matplotlibをダウングレードすべきでしょうか?

chap07のreadme.mdの句点

複数のgene fileを指定し、それぞれの数を指定すると、集団でのシミュレーションを行う gene fileは、chapter6で進化させたものを使う

複数のgene fileを指定し、それぞれの数を指定すると、集団でのシミュレーションを行う。gene fileは、chapter6で進化させたものを使う。

chap2/game_of_life.pyのWIDTHとHEIGHT

for文でspace.shape[0]、space.shape[1]としているところはWIDTHとHEIGHTでいいのでは。Visualizerの縦横はマジックナンバー600が使われているけれど、WINDOW_RESOLUTION_W(H)みたいな方がいいかも。

pymunkのインストールでエラー

まえがき「本書のサンプルプログラムに必要なライブラリーのインストール」(p. viii)
に載ってるコマンドラインからのインストールの一部( $ pip install pymunk)で
次のようなエラーが起きてしまいます.(環境はmacOS Mojave 10.14です.)
どなたか解決方法をご教示頂けないでしょうか?

$ pip install pymunk
Collecting pymunk
Using cached https://files.pythonhosted.org/packages/07/a7/1770c435971e2178d77052e36d6f69cc27eab7f395f7668d477db2e70163/pymunk-5.3.2.zip
Requirement already satisfied: cffi in /anaconda3/lib/python3.6/site-packages (from pymunk) (1.11.5)
Requirement already satisfied: pycparser in /anaconda3/lib/python3.6/site-packages (from cffi->pymunk) (2.19)
Building wheels for collected packages: pymunk
Running setup.py bdist_wheel for pymunk ... error
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/ln/sddgtwz17jvfgn5hjby2sljh0000gn/T/pip-install-job7y88d/pymunk/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /private/var/folders/ln/sddgtwz17jvfgn5hjby2sljh0000gn/T/pip-wheel-9giiew5n --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/constraint.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/vec2d.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/_chipmunk_cffi.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/shapes.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/body.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/bb.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/space_debug_draw_options.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/util.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/_pickle.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/contact_point_set.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/init.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/shape_filter.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/query_info.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/_chipmunk_cffi_abi.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/_libload.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/pyglet_util.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/arbiter.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/transform.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/autogeometry.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/space.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/collision_handler.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/matplotlib_util.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/pygame_util.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
creating build/lib.macosx-10.7-x86_64-3.6/pymunkoptions
copying pymunkoptions/init.py -> build/lib.macosx-10.7-x86_64-3.6/pymunkoptions
running egg_info
writing pymunk.egg-info/PKG-INFO
writing dependency_links to pymunk.egg-info/dependency_links.txt
writing requirements to pymunk.egg-info/requires.txt
writing top-level names to pymunk.egg-info/top_level.txt
reading manifest file 'pymunk.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'examples/.ipynb_checkpoints'
writing manifest file 'pymunk.egg-info/SOURCES.txt'
running build_ext
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpace.c -o chipmunk_src/src/cpSpace.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpaceStep.c -o chipmunk_src/src/cpSpaceStep.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpaceDebug.c -o chipmunk_src/src/cpSpaceDebug.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpGearJoint.c -o chipmunk_src/src/cpGearJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpGrooveJoint.c -o chipmunk_src/src/cpGrooveJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpaceQuery.c -o chipmunk_src/src/cpSpaceQuery.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpHashSet.c -o chipmunk_src/src/cpHashSet.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpDampedRotarySpring.c -o chipmunk_src/src/cpDampedRotarySpring.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpBody.c -o chipmunk_src/src/cpBody.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSweep1D.c -o chipmunk_src/src/cpSweep1D.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpShape.c -o chipmunk_src/src/cpShape.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpRobust.c -o chipmunk_src/src/cpRobust.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpPinJoint.c -o chipmunk_src/src/cpPinJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpPivotJoint.c -o chipmunk_src/src/cpPivotJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpCollision.c -o chipmunk_src/src/cpCollision.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpBBTree.c -o chipmunk_src/src/cpBBTree.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpArray.c -o chipmunk_src/src/cpArray.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpMarch.c -o chipmunk_src/src/cpMarch.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpPolyline.c -o chipmunk_src/src/cpPolyline.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/chipmunk.c -o chipmunk_src/src/chipmunk.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpDampedSpring.c -o chipmunk_src/src/cpDampedSpring.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpaceComponent.c -o chipmunk_src/src/cpSpaceComponent.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpConstraint.c -o chipmunk_src/src/cpConstraint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpPolyShape.c -o chipmunk_src/src/cpPolyShape.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpaceHash.c -o chipmunk_src/src/cpSpaceHash.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpArbiter.c -o chipmunk_src/src/cpArbiter.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSimpleMotor.c -o chipmunk_src/src/cpSimpleMotor.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpRotaryLimitJoint.c -o chipmunk_src/src/cpRotaryLimitJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpatialIndex.c -o chipmunk_src/src/cpSpatialIndex.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpRatchetJoint.c -o chipmunk_src/src/cpRatchetJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSlideJoint.c -o chipmunk_src/src/cpSlideJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpHastySpace.c -o chipmunk_src/src/cpHastySpace.o
cc -dynamiclib -arch i386 -arch x86_64 -arch x86_64 chipmunk_src/src/cpSpace.o chipmunk_src/src/cpSpaceStep.o chipmunk_src/src/cpSpaceDebug.o chipmunk_src/src/cpGearJoint.o chipmunk_src/src/cpGrooveJoint.o chipmunk_src/src/cpSpaceQuery.o chipmunk_src/src/cpHashSet.o chipmunk_src/src/cpDampedRotarySpring.o chipmunk_src/src/cpBody.o chipmunk_src/src/cpSweep1D.o chipmunk_src/src/cpShape.o chipmunk_src/src/cpRobust.o chipmunk_src/src/cpPinJoint.o chipmunk_src/src/cpPivotJoint.o chipmunk_src/src/cpCollision.o chipmunk_src/src/cpBBTree.o chipmunk_src/src/cpArray.o chipmunk_src/src/cpMarch.o chipmunk_src/src/cpPolyline.o chipmunk_src/src/chipmunk.o chipmunk_src/src/cpDampedSpring.o chipmunk_src/src/cpSpaceComponent.o chipmunk_src/src/cpConstraint.o chipmunk_src/src/cpPolyShape.o chipmunk_src/src/cpSpaceHash.o chipmunk_src/src/cpArbiter.o chipmunk_src/src/cpSimpleMotor.o chipmunk_src/src/cpRotaryLimitJoint.o chipmunk_src/src/cpSpatialIndex.o chipmunk_src/src/cpRatchetJoint.o chipmunk_src/src/cpSlideJoint.o chipmunk_src/src/cpHastySpace.o -o build/lib.macosx-10.7-x86_64-3.6/pymunk/libchipmunk.dylib
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
Undefined symbols for architecture i386:
"___memcpy_chk", referenced from:
_cpSpaceInit in cpSpace.o
_cpSpaceUseWildcardDefaultHandler in cpSpace.o
_handlerSetTrans in cpSpace.o
_ApproximateConcaveDecomposition in cpPolyline.o
_cpConvexHull in chipmunk.o
_cpSpaceActivateBody in cpSpaceComponent.o
_cpSpaceDeactivateBody in cpSpaceComponent.o
...
"___memmove_chk", referenced from:
_cpPolylineSetJoin in cpPolyline.o
_cpPolylineEnqueue in cpPolyline.o
"___stack_chk_fail", referenced from:
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
"___stack_chk_guard", referenced from:
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
...
"___stderrp", referenced from:
_cpMessage in chipmunk.o
"_abort", referenced from:
_cpSpaceSetStaticBody in cpSpace.o
_cpSpaceSetIterations in cpSpace.o
_cpSpaceSetDamping in cpSpace.o
_cpSpaceAddShape in cpSpace.o
_cpSpaceAddBody in cpSpace.o
_cpSpaceAddConstraint in cpSpace.o
_cpSpaceRemoveShape in cpSpace.o
...
"_atan2f", referenced from:
_cpvtoangle in chipmunk.o
"_calloc", referenced from:
_cpSpaceAlloc in cpSpace.o
_handlerSetTrans in cpSpace.o
_cpSpaceAddPostStepCallback in cpSpaceStep.o
_cpSpaceAllocContactBuffer in cpSpaceStep.o
_cpSpaceArbiterSetTrans in cpSpaceStep.o
_cpGearJointAlloc in cpGearJoint.o
_cpGrooveJointAlloc in cpGrooveJoint.o
...
"_cosf", referenced from:
_cpvforangle in cpBody.o
_cpPolylineSimplifyVertexes in cpPolyline.o
_cpvforangle in chipmunk.o
"_expf", referenced from:
_preStep in cpDampedRotarySpring.o
_preStep in cpDampedSpring.o
"_floorf", referenced from:
_cpSpaceHashSegmentQuery in cpSpaceHash.o
_preStep in cpRatchetJoint.o
"_fprintf", referenced from:
_cpMessage in chipmunk.o
"_free", referenced from:
_FreeWrap in cpSpace.o
_cpSpaceFree in cpSpace.o
_cpSpaceDestroy in cpSpace.o
_cpHashSetFree in cpHashSet.o
_cpBBTreeDestroy in cpBBTree.o
_cpSpaceHashDestroy in cpSpaceHash.o
_cpSpaceUnlock in cpSpaceStep.o
_cpHashSetFree in cpHashSet.o
_cpHashSetResize in cpHashSet.o
_cpSpaceDestroy in cpSpace.o
_cpHashSetFree in cpHashSet.o
_cpBBTreeDestroy in cpBBTree.o
_cpSpaceHashDestroy in cpSpaceHash.o
...
"_memcpy", referenced from:
_cpSpacePointQueryNearest in cpSpaceQuery.o
_NearestPointQueryNearest in cpSpaceQuery.o
_cpSpaceSegmentQueryFirst in cpSpaceQuery.o
_SegmentQueryFirst in cpSpaceQuery.o
_SetTransform in cpBody.o
_cpShapeInit in cpShape.o
_cpShapePointQuery in cpShape.o
...
"_memset", referenced from:
_DeepestNotch in cpPolyline.o
"_powf", referenced from:
_cpSpaceInit in cpSpace.o
_cpSpaceStep in cpSpaceStep.o
_bias_coef in cpGearJoint.o
_bias_coef in cpGrooveJoint.o
_bias_coef in cpPinJoint.o
_bias_coef in cpPivotJoint.o
_cpConstraintInit in cpConstraint.o
...
"_pthread_cond_broadcast", referenced from:
_HaltThreads in cpHastySpace.o
_RunWorkers in cpHastySpace.o
"_pthread_cond_destroy", referenced from:
_cpHastySpaceFree in cpHastySpace.o
"_pthread_cond_init$UNIX2003", referenced from:
_cpHastySpaceNew in cpHastySpace.o
"_pthread_cond_signal", referenced from:
_WorkerThreadLoop in cpHastySpace.o
"_pthread_cond_wait$UNIX2003", referenced from:
_cpHastySpaceSetThreads in cpHastySpace.o
_WorkerThreadLoop in cpHastySpace.o
_RunWorkers in cpHastySpace.o
"_pthread_create", referenced from:
_cpHastySpaceSetThreads in cpHastySpace.o
"_pthread_join$UNIX2003", referenced from:
_HaltThreads in cpHastySpace.o
"_pthread_mutex_destroy", referenced from:
_cpHastySpaceFree in cpHastySpace.o
"_pthread_mutex_init", referenced from:
_cpHastySpaceNew in cpHastySpace.o
"_pthread_mutex_lock", referenced from:
_cpHastySpaceSetThreads in cpHastySpace.o
_HaltThreads in cpHastySpace.o
_WorkerThreadLoop in cpHastySpace.o
_RunWorkers in cpHastySpace.o
"_pthread_mutex_unlock", referenced from:
_cpHastySpaceSetThreads in cpHastySpace.o
_HaltThreads in cpHastySpace.o
_WorkerThreadLoop in cpHastySpace.o
_RunWorkers in cpHastySpace.o
"_qsort", referenced from:
_cpSweep1DReindexQuery in cpSweep1D.o
_partitionNodes in cpBBTree.o
"_realloc", referenced from:
_ResizeTable in cpSweep1D.o
_cpArrayPush in cpArray.o
_cpPolylineShrink in cpPolyline.o
_cpPolylineGrow in cpPolyline.o
_cpPolylineSetPush in cpPolyline.o
"_sinf", referenced from:
_cpvforangle in cpBody.o
_cpvforangle in chipmunk.o
"_sysctlbyname", referenced from:
_cpHastySpaceSetThreads in cpHastySpace.o
"_vfprintf", referenced from:
_cpMessage in chipmunk.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1


Failed building wheel for pymunk
Running setup.py clean for pymunk
Failed to build pymunk
Installing collected packages: pymunk
Running setup.py install for pymunk ... error
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/ln/sddgtwz17jvfgn5hjby2sljh0000gn/T/pip-install-job7y88d/pymunk/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/ln/sddgtwz17jvfgn5hjby2sljh0000gn/T/pip-record-dpm7r4q_/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/constraint.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/vec2d.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/_chipmunk_cffi.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/shapes.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/body.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/bb.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/space_debug_draw_options.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/util.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/_pickle.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/contact_point_set.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/init.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/shape_filter.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/query_info.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/_chipmunk_cffi_abi.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/_libload.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/pyglet_util.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/arbiter.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/transform.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/autogeometry.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/space.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/collision_handler.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/matplotlib_util.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
copying pymunk/pygame_util.py -> build/lib.macosx-10.7-x86_64-3.6/pymunk
creating build/lib.macosx-10.7-x86_64-3.6/pymunkoptions
copying pymunkoptions/init.py -> build/lib.macosx-10.7-x86_64-3.6/pymunkoptions
running egg_info
writing pymunk.egg-info/PKG-INFO
writing dependency_links to pymunk.egg-info/dependency_links.txt
writing requirements to pymunk.egg-info/requires.txt
writing top-level names to pymunk.egg-info/top_level.txt
reading manifest file 'pymunk.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'examples/.ipynb_checkpoints'
writing manifest file 'pymunk.egg-info/SOURCES.txt'
running build_ext
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpace.c -o chipmunk_src/src/cpSpace.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpaceStep.c -o chipmunk_src/src/cpSpaceStep.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpaceDebug.c -o chipmunk_src/src/cpSpaceDebug.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpGearJoint.c -o chipmunk_src/src/cpGearJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpGrooveJoint.c -o chipmunk_src/src/cpGrooveJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpaceQuery.c -o chipmunk_src/src/cpSpaceQuery.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpHashSet.c -o chipmunk_src/src/cpHashSet.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpDampedRotarySpring.c -o chipmunk_src/src/cpDampedRotarySpring.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpBody.c -o chipmunk_src/src/cpBody.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSweep1D.c -o chipmunk_src/src/cpSweep1D.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpShape.c -o chipmunk_src/src/cpShape.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpRobust.c -o chipmunk_src/src/cpRobust.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpPinJoint.c -o chipmunk_src/src/cpPinJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpPivotJoint.c -o chipmunk_src/src/cpPivotJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpCollision.c -o chipmunk_src/src/cpCollision.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpBBTree.c -o chipmunk_src/src/cpBBTree.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpArray.c -o chipmunk_src/src/cpArray.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpMarch.c -o chipmunk_src/src/cpMarch.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpPolyline.c -o chipmunk_src/src/cpPolyline.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/chipmunk.c -o chipmunk_src/src/chipmunk.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpDampedSpring.c -o chipmunk_src/src/cpDampedSpring.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpaceComponent.c -o chipmunk_src/src/cpSpaceComponent.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpConstraint.c -o chipmunk_src/src/cpConstraint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpPolyShape.c -o chipmunk_src/src/cpPolyShape.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpaceHash.c -o chipmunk_src/src/cpSpaceHash.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpArbiter.c -o chipmunk_src/src/cpArbiter.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSimpleMotor.c -o chipmunk_src/src/cpSimpleMotor.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpRotaryLimitJoint.c -o chipmunk_src/src/cpRotaryLimitJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSpatialIndex.c -o chipmunk_src/src/cpSpatialIndex.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpRatchetJoint.c -o chipmunk_src/src/cpRatchetJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpSlideJoint.c -o chipmunk_src/src/cpSlideJoint.o
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -arch i386 -arch x86_64 -Ichipmunk_src/include -c chipmunk_src/src/cpHastySpace.c -o chipmunk_src/src/cpHastySpace.o
cc -dynamiclib -arch i386 -arch x86_64 -arch x86_64 chipmunk_src/src/cpSpace.o chipmunk_src/src/cpSpaceStep.o chipmunk_src/src/cpSpaceDebug.o chipmunk_src/src/cpGearJoint.o chipmunk_src/src/cpGrooveJoint.o chipmunk_src/src/cpSpaceQuery.o chipmunk_src/src/cpHashSet.o chipmunk_src/src/cpDampedRotarySpring.o chipmunk_src/src/cpBody.o chipmunk_src/src/cpSweep1D.o chipmunk_src/src/cpShape.o chipmunk_src/src/cpRobust.o chipmunk_src/src/cpPinJoint.o chipmunk_src/src/cpPivotJoint.o chipmunk_src/src/cpCollision.o chipmunk_src/src/cpBBTree.o chipmunk_src/src/cpArray.o chipmunk_src/src/cpMarch.o chipmunk_src/src/cpPolyline.o chipmunk_src/src/chipmunk.o chipmunk_src/src/cpDampedSpring.o chipmunk_src/src/cpSpaceComponent.o chipmunk_src/src/cpConstraint.o chipmunk_src/src/cpPolyShape.o chipmunk_src/src/cpSpaceHash.o chipmunk_src/src/cpArbiter.o chipmunk_src/src/cpSimpleMotor.o chipmunk_src/src/cpRotaryLimitJoint.o chipmunk_src/src/cpSpatialIndex.o chipmunk_src/src/cpRatchetJoint.o chipmunk_src/src/cpSlideJoint.o chipmunk_src/src/cpHastySpace.o -o build/lib.macosx-10.7-x86_64-3.6/pymunk/libchipmunk.dylib
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
Undefined symbols for architecture i386:
"___memcpy_chk", referenced from:
_cpSpaceInit in cpSpace.o
_cpSpaceUseWildcardDefaultHandler in cpSpace.o
_handlerSetTrans in cpSpace.o
_ApproximateConcaveDecomposition in cpPolyline.o
_cpConvexHull in chipmunk.o
_cpSpaceActivateBody in cpSpaceComponent.o
_cpSpaceDeactivateBody in cpSpaceComponent.o
...
"___memmove_chk", referenced from:
_cpPolylineSetJoin in cpPolyline.o
_cpPolylineEnqueue in cpPolyline.o
"___stack_chk_fail", referenced from:
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
"___stack_chk_guard", referenced from:
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
_cpSpaceCollideShapes in cpSpaceStep.o
_cpSpaceDebugDrawShape in cpSpaceDebug.o
_cpSpaceDebugDrawConstraint in cpSpaceDebug.o
_cpShapesCollide in cpShape.o
_EPA in cpCollision.o
_EPARecurse in cpCollision.o
_ApproximateConcaveDecomposition in cpPolyline.o
...
...
"___stderrp", referenced from:
_cpMessage in chipmunk.o
"_abort", referenced from:
_cpSpaceSetStaticBody in cpSpace.o
_cpSpaceSetIterations in cpSpace.o
_cpSpaceSetDamping in cpSpace.o
_cpSpaceAddShape in cpSpace.o
_cpSpaceAddBody in cpSpace.o
_cpSpaceAddConstraint in cpSpace.o
_cpSpaceRemoveShape in cpSpace.o
...
"_atan2f", referenced from:
_cpvtoangle in chipmunk.o
"_calloc", referenced from:
_cpSpaceAlloc in cpSpace.o
_handlerSetTrans in cpSpace.o
_cpSpaceAddPostStepCallback in cpSpaceStep.o
_cpSpaceAllocContactBuffer in cpSpaceStep.o
_cpSpaceArbiterSetTrans in cpSpaceStep.o
_cpGearJointAlloc in cpGearJoint.o
_cpGrooveJointAlloc in cpGrooveJoint.o
...
"_cosf", referenced from:
_cpvforangle in cpBody.o
_cpPolylineSimplifyVertexes in cpPolyline.o
_cpvforangle in chipmunk.o
"_expf", referenced from:
_preStep in cpDampedRotarySpring.o
_preStep in cpDampedSpring.o
"_floorf", referenced from:
_cpSpaceHashSegmentQuery in cpSpaceHash.o
_preStep in cpRatchetJoint.o
"_fprintf", referenced from:
_cpMessage in chipmunk.o
"_free", referenced from:
_FreeWrap in cpSpace.o
_cpSpaceFree in cpSpace.o
_cpSpaceDestroy in cpSpace.o
_cpHashSetFree in cpHashSet.o
_cpBBTreeDestroy in cpBBTree.o
_cpSpaceHashDestroy in cpSpaceHash.o
_cpSpaceUnlock in cpSpaceStep.o
_cpHashSetFree in cpHashSet.o
_cpHashSetResize in cpHashSet.o
_cpSpaceDestroy in cpSpace.o
_cpHashSetFree in cpHashSet.o
_cpBBTreeDestroy in cpBBTree.o
_cpSpaceHashDestroy in cpSpaceHash.o
...
"_memcpy", referenced from:
_cpSpacePointQueryNearest in cpSpaceQuery.o
_NearestPointQueryNearest in cpSpaceQuery.o
_cpSpaceSegmentQueryFirst in cpSpaceQuery.o
_SegmentQueryFirst in cpSpaceQuery.o
_SetTransform in cpBody.o
_cpShapeInit in cpShape.o
_cpShapePointQuery in cpShape.o
...
"_memset", referenced from:
_DeepestNotch in cpPolyline.o
"_powf", referenced from:
_cpSpaceInit in cpSpace.o
_cpSpaceStep in cpSpaceStep.o
_bias_coef in cpGearJoint.o
_bias_coef in cpGrooveJoint.o
_bias_coef in cpPinJoint.o
_bias_coef in cpPivotJoint.o
_cpConstraintInit in cpConstraint.o
...
"_pthread_cond_broadcast", referenced from:
_HaltThreads in cpHastySpace.o
_RunWorkers in cpHastySpace.o
"_pthread_cond_destroy", referenced from:
_cpHastySpaceFree in cpHastySpace.o
"_pthread_cond_init$UNIX2003", referenced from:
_cpHastySpaceNew in cpHastySpace.o
"_pthread_cond_signal", referenced from:
_WorkerThreadLoop in cpHastySpace.o
"_pthread_cond_wait$UNIX2003", referenced from:
_cpHastySpaceSetThreads in cpHastySpace.o
_WorkerThreadLoop in cpHastySpace.o
_RunWorkers in cpHastySpace.o
"_pthread_create", referenced from:
_cpHastySpaceSetThreads in cpHastySpace.o
"_pthread_join$UNIX2003", referenced from:
_HaltThreads in cpHastySpace.o
"_pthread_mutex_destroy", referenced from:
_cpHastySpaceFree in cpHastySpace.o
"_pthread_mutex_init", referenced from:
_cpHastySpaceNew in cpHastySpace.o
"_pthread_mutex_lock", referenced from:
_cpHastySpaceSetThreads in cpHastySpace.o
_HaltThreads in cpHastySpace.o
_WorkerThreadLoop in cpHastySpace.o
_RunWorkers in cpHastySpace.o
"_pthread_mutex_unlock", referenced from:
_cpHastySpaceSetThreads in cpHastySpace.o
_HaltThreads in cpHastySpace.o
_WorkerThreadLoop in cpHastySpace.o
_RunWorkers in cpHastySpace.o
"_qsort", referenced from:
_cpSweep1DReindexQuery in cpSweep1D.o
_partitionNodes in cpBBTree.o
"_realloc", referenced from:
_ResizeTable in cpSweep1D.o
_cpArrayPush in cpArray.o
_cpPolylineShrink in cpPolyline.o
_cpPolylineGrow in cpPolyline.o
_cpPolylineSetPush in cpPolyline.o
"_sinf", referenced from:
_cpvforangle in cpBody.o
_cpvforangle in chipmunk.o
"_sysctlbyname", referenced from:
_cpHastySpaceSetThreads in cpHastySpace.o
"_vfprintf", referenced from:
_cpMessage in chipmunk.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1

----------------------------------------

Command "/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/ln/sddgtwz17jvfgn5hjby2sljh0000gn/T/pip-install-job7y88d/pymunk/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/ln/sddgtwz17jvfgn5hjby2sljh0000gn/T/pip-record-dpm7r4q_/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/ln/sddgtwz17jvfgn5hjby2sljh0000gn/T/pip-install-job7y88d/pymunk/

以上

chap2/cellular_automaton_1dの名称

"cellular_automaton"という名前について、好みの問題が大きいかもしれないけれど、"cellular_automata"の方が呼び方としては若干メジャーと思われる。

scl_utils.pyのムーア近傍の取得のコードに関しまして

書籍を読んでいて、細かい点ですが、

https://github.com/alifelab/alife_book_src/blob/master/chap03/scl_utils.py

のモジュールの、 get_random_2_moore_neighborhood 関数の、以下の部分が、

    elif y == n0_y:
        n1_x = n0_y
        n1_y = np.random.choice([(n0_y+1)%space_size, (n0_y-1)%space_size])

y座標が1つ目のy座標と同じ場合の分岐としては、2つ目のムーア近傍の座標は1つ目のムーア近傍の座標と同じになるのでは・・・?と感じました。

n1_x = n0_yではなくn1_x = n0_xが正しいのでは・・?といった具合です。

もし私の方の勘違いでしたら、そのままクローズいただいて問題ございません。

simulatorをjupyter notebook上で動くようにしたい

ALife 5章の braitenberg_vehicle.py と subsumption.py をjupyter notebook上で実行させたいのですが、実行しようとすると以下のようなエラーが発生します。

(subsumption.py 実行、必要そうな部分のみ抜粋)---------------------------------------

Exception Traceback (most recent call last)
in
8
9 # simulatorの初期化 (Appendix参照)
---> 10 simulator = VehicleSimulator(obstacle_num=5)
11 #simulator = VehicleSimulator
12 while simulator:

Exception: Unsupported type <class 'list'> of [<pymunk.shapes.Segment object at 0x0000018317ACCA58>, <pymunk.shapes.Segment object at 0x0000018317ACCE10>, <pymunk.shapes.Segment object at 0x0000018317ACCEF0>, <pymunk.shapes.Segment object at 0x00000183192E8CF8>].


【例外:サポートされていないタイプが呼ばれている】ことが原因でエラーをはいているのは何となく分かるのですが、jupyter notebook上で実行するにはどうすればよいでしょうか

chap02/cellular_automata_1d.pyのWIDTHとHEIGHTの扱い

1D-CAの状態更新は、現在の状態と次の状態をスワップしながらVisualizerに書き込んでいければ美しいと思うが(無限ループなのでHEIGHTは本質的に不要)、Visualizerが入力としてマトリクスを必要とするなら結局なんらかの変数は必要か。

get_random_2_moore_neighborhoodの実装が正しくない

https://github.com/alifelab/alife_book_src/blob/13b4502ad42b12f543d2ed42588596de1540f1ba/chap03/scl_utils.py#L39C1-L39C1

def get_random_2_moore_neighborhood(x, y, space_size):
    n0_x, n0_y = get_random_moore_neighborhood(x, y, space_size)
    if x == n0_x:
        n1_x = np.random.choice([(n0_x+1)%space_size, (n0_x-1)%space_size])
        n1_y = n0_y
    elif y == n0_y:
        n1_x = n0_x # ここがn0_yになってしまっている
        n1_y = np.random.choice([(n0_y+1)%space_size, (n0_y-1)%space_size])
    else:
        n= [(x, n0_y), (n0_x, y)]
        n1_x, n1_y = n[np.random.randint(len(n))]
    return n0_x, n0_y, n1_x, n1_y

正しくは上記のようになると思われます。

ant_nn_ga.pyの変数の名前

chapte r6 ant_nn_ga.py の変数の名前でちょっと混乱しています

for g in population: この g は多分 generationだと思いますが、本当にgenerationという意味ですか?1匹のありではなくて?

# best population alive next gen
    offsprings[0] = best_pop 

ここでさらに混乱、本を読んでいないせいかもしれません。
offspringは1匹のありだと思っていましたが、best_pop はpopulationで、population = 1匹 という風に読んでします…

Windows+Anacondaでpygame周りのエラー

Traceback (most recent call last):
File "game_of_life.py", line 7, in
from alifebook_lib.visualizers import MatrixVisualizer
File "..\alifebook_lib\visualizers_init_.py", line 1, in
from .matrix_visualizer import MatrixVisualizer
File "..\alifebook_lib\visualizers\matrix_visualizer.py", line 3, in
import pygame
File "C:\Users\hashimoto\Anaconda3\lib\site-packages\pygame_init_.py", line 133, in
from pygame.base import *
ImportError: No module named 'pygame.base'

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.