Social Impact Simulation Including Social Capital, Based on Current Status of Multi-Agent Simulation
https://www.iaiai.org/journals/index.php/IJSKM/article/view/834
江端智一のホームページ
Social Impact Simulation Including Social Capital, Based on Current Status of Multi-Agent Simulation
https://www.iaiai.org/journals/index.php/IJSKM/article/view/834
私は、複数の言語(プログラミング言語のことです)を使うことができます。
I can use more than one language (i.e., programming languages).
とくに、C言語とGO言語については、かなり使い込んでいまして ―― 現在も、私は、会社の中で『呪文言語を扱う魔術師』という立ち位置で、使い倒されています。
In particular, I have used the C and GO languages to a great extent - even now, I am used to the position of ‘spell-casting language wizard’ in the company.
C言語とGO言語は、設計思想が似ていて、GO言語はC言語の進化形とも言われることがあります(私は、違うと思っているのですが)。
The C and GO languages have a similar design philosophy, and the GO language is sometimes said to be an evolution of the C language (although I think it is not).
で、当然、この2つを融合させて使おうという発想が出てくるわけです。
So, naturally, the idea is to use a fusion of the two.
これが、"cgo" ―― GoからCの関数/型にアクセスするために用いるパッケージであり、簡単に言えば、『Cで書かれたライブラリを、Goでも再利用できる』ようにするものです。
This is ‘cgo’ - a package used to access C functions/types from Go, which, simply put, allows ‘libraries written in C to be reused in Go’.
-----
私、何年か前に、このcgoを試みて、失敗しております。
Some years ago, I tried and failed to do this 'cgo'.
まあ、趣味でやっていたものなので、失敗しても気にしていませんでした。
It was my hobby, and I didn't mind if it failed.
-----
ところが、これが、"業務"となると、全く話が違ってきます。
However, when it comes to ‘business,’ the story is entirely different.
『動かさなければ、何もしなかったことになる』 ―― これが、ソフトウェア開発の怖いところです。
‘If you don't move it, you haven't done anything’ - this is the scary part of software development.
そもそも、参考文献が少ないし、下手すると『全くない』てなこともあります。
There are few references, and in some cases, ‘none at all.’
仕事としてプログラミングをやる人にとって、出版されている本は、役に立たないことが多いです。
For those who do programming as a job, published books are often not helpful.
本の内容が『そんなことは知っとるわ!』となってしまうことは、仕方がないことです。
When reading the book, ‘I already knew it’ is inevitable.
-----
ただ ―― 動かないプログラム、動かないシステムというのは、本当に怖いです。
However, a program that doesn't work, a system that doesn't work, is horrifying.
一週間、一日18時間、パソコンと格闘していたとしても、プログラムが動かなければ、『あんた、この一週間、何やってたの?』と言わるかもしれない、という恐怖が常に付きまといます。
There is always the fear that if you work on a computer 18 hours a day for a week and the program doesn't work, you might be asked, ‘What have you been doing all week?’
特許明細書や報告書は、内容はどうあれ、書けば増えますし、いつかは終わります。もちろん、これらの業務がラクであると言う気はありませんが。
Patent specifications and reports, whatever their content, will increase as they are written and will be finished at some point. Of course, I don't mean to suggest that these tasks are easy.
しかし、成果が"0"か"1"でしか評価できないプログラム ―― しかも、それが、自分だけの努力では、なんともならないもの(例:ハードウェアやミドルウェアとの相性)である場合は、もうどうしようもありません。
However, if the results of a program can only be evaluated on a scale of ‘0’ or ‘1’ - and this cannot be managed by your efforts alone (e.g., compatibility with hardware or middleware), there is nothing more you can do.
-----
ChatGPTは、かなりがんばってくれています。
ChatGPT has done a lot of work.
私が、
When I said,
『そのやり方、今日、3回目の同じ説明だけど』
‘That's the third time today I've had to explain the same thing that way.’
と嫌味を言うと、きちんと謝罪して見せた後で、4回目の説明を始めてしまいます。
When I am sarcastic in this way, ChatGPT apologizes and adequately starts explaining for the fourth time.
仕方ないですよね。
It can't be helped.
ChatGPTだって『なんでもは知らないわよ。知っていることだけ』と言いたいことでしょう。
Even ChatGPT would have said, ‘I don't know everything. Only what I know.
ChatGPTが知らないことは、それはもう膨大にあります。
There is a considerable amount that ChatGPT does not know.
そして、世の中に新しいものが登場するたび、ChatGPTも、ゼロから勉強しなければならないです。
And every time something new appears, ChatGPT must also learn from scratch.
-----
ともあれ、先程、人生最初のcgoのプログラムが動いて、今、私は安堵の溜息をついています。
Anyway, I just got the first 'cgo' program working, and I sigh with relief.
不安の溜息と安堵の溜息 ―― ソフトウェアエンジニアは、いつだって溜息をついています。
Sighs of anxiety and sighs of relief -- Software engineers are always sighing.
本日は、コラムがリリースされた日なので、日記はお休みです。
My new column is released today, so I am taking a day off.
"We don't need an AI that plays the "Go" game and enjoys pictures of cats."
-----
突然、
Suddenly, I said,
「羽川翼の決めセリフ、『何でもは知らないわよ。知っていることだけ』の初出は?」
"Where is the debut of Hanakawa Tsubasa's standard phrase, "I don't know everything. What I know is what I have known" ?"
と尋ねた私に、
「化物語、上巻、セクション2」と
"Bakemonogatari, front half, section No.2"
間髪入れずに応えた、江端家の次女は、
My junior daughter, who answered it in no time,
実在します。
Has existed.
Windows10に、GStreamerの1.24をインストール(フルインストールを選ぶこと)をしたのですが、定番の、
$ gst-launch-1.0.exe videotestsrc ! autovideosink
Use Windows high-resolution clock, precision: 1 ms
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'autovideosink0': gst.d3d11.device.handle=context, device=(GstD3D11Device)"
\(GstD3D11Device\)\ d3d11device2", adapter=(uint)0, adapter-luid=(gint64)41376, device-id=(uint)1042
, vendor-id=(uint)32902, hardware=(boolean)true, description=(string)"Intel\(R\)\ HD\ Graphics\ 4600
";
ERROR: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstD3D11VideoSink:autovid
eosink0-actual-sink-d3d11video: Cannot create converter
Additional debug info:
Failed to prepare d3d11window
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error
.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3177): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:vi
deotestsrc0:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.
Freeing pipeline ...
となります。別のWindows BOXでも、先日も経験して、青ざめていました。
結果として、
$ gst-launch-1.0 videotestsrc ! glimagesink
とすれば動きます。

autovideosinkが動かん、っていうのは、結局分かっていませんが、これは困りものです。
以下自分用メモ
-UDP通信の実験
-受信側
-gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay ! udpsink host=192.168.101.10 port=38089
(ローカルの場合、host=127.0.0.1とする. host=localhost は動かない)
-送信側
-gst-launch-1.0 udpsrc port=38089 caps="application/x-rtp,media=video,encoding-name=H264,payload=96" ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! glimagesink
-
-SRT通信の実験
-受信側
-gst-launch-1.0 srtsrc uri="srt://0.0.0.0:38089?mode=listener" keep-listening=true ! tsdemux ! h264parse ! avdec_h264 ! videoconvert ! glimagesink sync=false
-送信側
-gst-launch-1.0 rtspsrc location=rtsp://cam:Cam12345@192.168.0.10/Src/MediaInput/stream_1 latency=0 ! rtph264depay ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=640,height=360 ! videorate ! video/x-raw,framerate=5/1 ! x264enc speed-preset=ultrafast tune=zerolatency key-int-max=1 ! mpegtsmux ! srtserversink uri = \"srt://192.168.101.10:38089\" latency=500

■コンビニ 5〜10分 (Lenovo Support) ?
■イオンモール 3〜4時間 (TripAdvisor)。tripadvisor.com.au/Attraction_Review-g298316-d11444576-Reviews-AEON_Mall_Shah_Alam-Shah_Alam_Petaling_District_Selangor.html
午前10時から午後2時の間
■デパート 2〜3時間(デパート滞在時間に関する調査) 出展調査中
午前10時から午後2時の間
■理髪店 30分から1時間程度 自宅から歩いていける理髪店までの距離は、1〜2キロメートル程度が一般的です。これは、徒歩で約10〜20分程度の距離です
午前9時から午後2時の間が多い
■スーパーマーケット 20〜30分程度 郊外や田舎では、スーパーマーケットがより遠くにある場合があり、2〜3キロメートル程度の距離になることもあります。これは徒歩で約20〜30分程度の距離です
午前10時から12時: 午後12時から2時: 夕方(午後4時以降):
■フィットネスクラブの一般的な滞在時間は、約1〜2時間
早朝(午前5時〜7時): 午前中(午前9時〜11時): 夕方から夜(午後5時〜8時):
■郵便局の滞在時間は、一般的に10〜20分程度です
午前10時〜12時: 午後2時〜4時: 夕方(午後4時〜5時半):
■役所での滞在時間は、手続きの内容や混雑状況によって異なりますが、一般的には30分から2時間程度です。
午前9時〜11時: 午後1時〜3時: 夕方(午後3時〜4時半):
■イトーヨーカドーの滞在時間は、買い物の内容や目的によって異なりますが、一般的には約1〜2時間程度です。
午前10時〜12時: 午後2時〜4時: 夕方(午後4時〜6時):
■小学校、中学校、高校、大学の滞在時間を推定してください
■病院 一般診察: 約1〜2時間
午前8時〜10時: 午前10時〜正午: 午後1時〜3時:
■医院 一般診察: 約30分〜1時間
午前8時〜10時: 午前10時〜正午: 午後1時〜3時:
病院情報
京急ストア 35.36728848674138, 139.6299896697414
幼稚園、保育園が、この近くにはない
高校はない
図書館もない
私は、エヴァンゲリオンというものが良く分かっていませんが、
I don't really know what Evangelion is, though,
この歌を「良い」と思って頂いた皆さんには、是非、小説「さよならジュピター」を読んで頂きたいのです。
I invite everyone who thinks this song is ‘good’ to read the novel "Byebye Jupiter."
-----
上巻はがんばって、読みきって下さい。
Good luck with the upper volume; read it through.
下巻の1/5あたりで、衝撃の事実が判明します。
A shocking revelation appears around 1/5 of the way down the book.
人類の命運に対して、絶望的な戦いに望むエンジニアたちに、"この歌"が捧げられたことを、ご理解頂けると思います。
You will understand that ‘the song’ is dedicated to the engineers who want to fight a desperate battle against the fate of humanity.
ここで、大切なことを申し上げます。
Here, I would like to mention something important.
小説「さよならジュピター」が先です。
Read The novel "Byebye Jupiter" first.
映画「さよならジュピータ」は、その後にして下さい(映画はキャンセルして頂いても構いません)。
After that, watch the movie (or cancel the movie)
-----
今、多くの人が『一番大切なものの為に生きろ』と言います。
Many people now say ‘live for what matters most’.
で、それは、何だと尋ねると、彼らは、"家族"だとか、"恋人"だとか、"友人"だとか、と、言います。
When I asked them what that was, they said ‘family,’ ‘lovers, ' or ‘friends.’
それを聞きながら、私はいつも思っています。
As I listen to them, I always think.
―― うるせえ、馬鹿野郎
"Shut the fuck up, you idiot."
と。
一体、どれだけの人間が『一番大切なもの』を意識して生きていると思っているのか。
How many of us think, 'What matters most in our life’?
私たちは、日々を生きることで精一杯です。『一番大切なもの』など考えて生きるほど余裕はないのです。
We are all too busy living day to day. We don't have enough time to consider ‘what is most important.’
そんなことを語るやつらは、おそらく時間も金も余裕のある、いけすかないインテリ野郎だろう ―― と、最大級の偏見をもって、私は言い放ちます。
I want to say, with the most extraordinary prejudice, that the people who talk about such things are probably obnoxious intellectuals with plenty of time and money to spare.
"人類"とか"社会"とか"愛"とか、そんなものは、どうだっていいのです。
‘Humanity’, ‘society’, ‘love’, and so on, don't matter.
逆に、私たちは、自分の課せられたミッションの為に、命をかけたっていいのです。
On the contrary, we are willing to put our lives on the line for our assigned mission.
-----
この小説の主人公は、"コンマ数パーセント"のために、『最期まで、システムから逃げずに、守りきったエンジニア』です。
The novel's protagonist is an engineer who, for a few tenths of a percent, ‘did not run away from the system, but protected it until the end.’
普通のエンジニアです。
Ordinary engineer.
その普通のエンジニアは、結果として、命を賭して自分の仕事を成し遂げます。
That ordinary engineer, as a result, put his life on the line to get his job done.
その結果、人類が救われたとしても ―― それは単なる"結果"に過ぎません。
Even if humanity saved their life, it is only a ‘result’ for him.
彼にとって、それが"目的"ではないからです。
For him, it is not a ‘goal’.
-----
この小説では、人類を太陽系外に脱出させるため"だけ"に、輸送船の建造をするエンジニアや、その脱出計画を立案し実施するエンジニアも登場します。
The novel also features engineers who build transports ‘just’ to get humans out of the solar system and engineers who develop and implement escape plans.
(ちなみに、私の理想のシステムは、ここで登場する、相互のシステムが自律的に機能する超分散コンピュータです)。
(Incidentally, my ideal system is the super-distributed computer that appears here, in which mutual systems function autonomously.)
彼らのミッションは、選ばれた人を、太陽系外に限られた期間内にできるだけ多く送り出すことでした。
Their mission was to send as many selected people as possible out of the solar system within a limited period.
そこには"自分"は入っていません。
There is no ‘me’ in it.
この小説の中では、彼らの仕事が、"特別"でもなく、"美徳"でもなく、"気高い行為"でもなく、淡々と描かれています。
In this novel, their works are as ‘special,’ ‘virtuous,’ or ‘noble deeds,’ but in a straightforward manner.
私は、「それでいい」し、そして「それがいい」と、思うのです。
I'm ‘okay with it’ and think, ‘That's good.’
可能であれば、私も、そういうエンジニアの人生を生きて、そういうエンジニアとして生涯を終えたいです。
If possible, I would like to live the life of such an engineer and end my life as such an engineer.
# 実際のところは、私は、PC障害くらいで凹んでしまう、ヘタレなエンジニアですけどね。
# In reality, though, I'm a lousy engineer who gets depressed at the slightest PC failure.
自分の環境で作ったpostgresqlのDBを、先方にわざわざ作ってもらうのは申し訳ないので、丸ごとコピーして送付する方法
環境はこんな感じ
[192.168.0.23 の中に作ったDockerのPostgresqlのDBを起動]

中身は、
C:\Users\ebata>psql -U postgres -h 192.168.0.23 -p 15432Password for user postgres:psql (13.4, server 12.5 (Debian 12.5-1.pgdg100+1))Type "help" for help.postgres=# \lList of databasesName | Owner | Encoding | Collate | Ctype | Access privileges-----------+----------+----------+------------+------------+-----------------------agent_db | postgres | UTF8 | en_US.utf8 | en_US.utf8 |kitaya_db | postgres | UTF8 | en_US.utf8 | en_US.utf8 |postgres | postgres | UTF8 | en_US.utf8 | en_US.utf8 |template0 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres +| | | | | postgres=CTc/postgrestemplate1 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres +| | | | | postgres=CTc/postgres(5 rows)
[192.168.0.8(localhost)に入っている psqlクライアント一式]
で、
C:\Users\ebata>pg_dump -U postgres -h 192.168.0.23 -p 15432 kitaya_db > kitaya_db.sql
Password:
と
C:\Users\ebata>pg_dump -U postgres -h 192.168.0.23 -p 15432 agent_db > agent_db.sql
Password:
で完了
あとは、kitaya_db.sql と agent_db.sqlを先方に送って、
バスが宇都宮ライトレールの上を驀進している ―― 宇都宮ライトレールの利用を拒否させるような、ダイクストラをどうやって作ろうか
の最後の2行10行を参考に、DBを作って貰えばOK
以上
dockerは、どのOS環境でも動くを唄っていますが、基本的に、わたしは、どんなパッケージであろうとも、「これ」を信じていません。
とくに時系列方向については、全く信用していません。
ともあれ、ノートPCにtomioka_dbをdocker-compose.ymlで再構築した時、以下の部分の変更が必要でしたので、逐次メモしていきます。
昨日、大学からの帰りの途中の駅の、いわゆる「10分床屋」でカットをしてきました。
Yesterday, I had a cut at the so-called ‘10-minute barbershop’ at the station on my way back from university.
私、ここ1年くらいバリカン使って、セフルカットしていたのですが、嫁さんから、『長女の結婚式まではセルフカットを厳禁する』との命令を受けていたからです。
For the past year or so, I have been using clippers and cutting myself vertically, but my wife had ordered me to forbid self-cutting until my eldest daughter's wedding strictly.
最近、私は、バリカンで髪の毛を切り落しているのですが、家族に評判が良くありません ―― このお話は、これまで何度もしましたが。
理容師さんは、私の「セルフカット」を一発で見抜きました。
The barber spotted my ‘self-cut’ in one shot.
『何故見抜けたか』と尋ねたところ、「酷い凸凹がある」とのこと。
‘I asked him how he could spot it,’ she said, ‘I have a terrible bump on my head.’
前回のセルフカットから十分な時間が経過して、私の髪も十分に伸びていたはずです。
Enough time would have passed since my last self-cut, and my hair would have grown long enough.
それでも、セルフカットが一発で見抜かれたということは、私のセルフカットの技術が「よほど酷いものだった」という証左でしょう。
Nevertheless, she spotted my self-cutting in one shot, proving my self-cutting skills were ‘so bad.’
ちょっと落ち込みました。
I was a bit depressed.
-----
今回も、オーダーは「スポーツ刈り」にして貰いました。細かい注文しなくて面倒がないからです。
Again, the order was for a ‘sports trim.’ Because I don't have to order details, and there is no hassle.
以前、私、「丸刈り」をオーダーしたことがあったのですが、鏡を見る度に、目の前に東京裁判の被告がいて自分でもビックリしていました。
I once ordered a round cut,’ and I was surprised to see the defendant from the Tokyo Trials in front of me every time I looked in the mirror.
今回は、広田弘毅 元首相のように見えます。
This time, it appears to be former Prime Minister Kouki Hirota.
―― 男はだれでも歳を取ると、東京裁判の被告となる
"When every man ages, he becomes a defendant in the Tokyo Trials."
そんな気がします。『短髪』にすれば、ですが。
I feel that way. If you have ‘short hair,’ that is.
ただ、彼(広田弘毅 元首相)のように見えるなら、「それもいいかな」とも思っています。
But if I look like him (former Prime Minister Hiroki Hirota), I think, ‘That's OK.'
私が東京裁判の登場人物の中で、最大級に「かっこいい」と思っているのが、ベン・ブルース・ブレイクニー弁護士とジョージ・A・ファーネス弁護士です。
I believe lawyers Ben Bruce Blakney and George A. Furness are two of the most significant ‘cool’ characters in the Tokyo Trials.
しかし、東京裁判の被告の中で、私が「唯一、かっこいい」と思っているのは、広田弘毅元首相です。
However, of all the defendants in the Tokyo Trials, the only one I consider ‘cool’ is former Prime Minister Kouki Hirota.