2023,江端さんの忘備録

「陰謀やテロリズムでは、けっきょくのところ歴史の流れを逆行させることはできない。だが、停滞させることはできる」
(創元SF文庫「銀河英雄伝説」7巻 284Pより)

"Conspiracies and terrorism cannot, after all, reverse the course of history. But they can stall it."(From "The Legend of the Galactic Heroes," Sogen SF Bunko, vol. 7, p. 284)

という、ヤン提督の言葉は、長期的に見た時には、正しいのかもしれません。

Admiral Yang may be right in the long run.

しかし、私たちが生きている間の短い時間においては、そうでもないように見えることがあります。

In the short time we are alive, however, this may not appear to be the case.

-----

まず、少なくとも私たちの国家は、法律によって、いかなる形の暴力も容認しないことになっております。

First, at least our state, by law, does not tolerate violence in any form.

(法によって定められた組織 ―― 暴力装置(警察、自衛隊) ―― によって、詳細かつ厳格にコントロールされた暴力を除きます)

(except for violence that is detailed and strictly controlled by an organization defined by law -- a violent apparatus (police, Self-Defense Forces))

法治国家である我が国においては、いかなるテロリズムも許されません。

In our country, which is governed by the rule of law, terrorism of any kind will not be tolerated.

-----

しかし、テロによって、問題がクローズアップされることがあります。

However, terrorism can bring the issue to the forefront.

『"元首相の殺害テロ事件"と"統一協会"』は、典型的な例でしょう。

The "terrorist murder of the former prime minister" and the "Unification Association" are typical examples.

この『統一協会』問題は、私が最初に知った時から、実に40年間も動かなかったのに、あのテロ事件を契機として一気に動き出しました。

This "Unification Association" issue had been inactive for 40 years since I first learned about it, but the terrorist attack was the catalyst that set it all in motion.

そして、多分、今回がラストチャンスです ―― 最近、この問題に対する世間の注目度が落ちてきているようで、私はとても心配しています。

And maybe this is the last time -- I am very concerned that public attention to this issue seems to be waning lately.

今回の統一地方選挙で、この『統一協会問題』が争点にならなかった(ように見える)ことに、私はショックを受けています。

I am shocked that this "Unification Association issue" was not (seemingly) an issue in the current local elections.

それはさておき。

Aside from that.

-----

最近、また、現職首相を狙ったテロ事件が発生しました。

Recently, another terrorist attack targeted the incumbent prime minister.

犯行動機については、まだ明らかになっていません。

The motive for the crime is not yet clear.

しかし、少なくとも、テロの犯人は『自分の主張を社会に押しつけることができた』という一点においては、その目的を達成している訳です。

However, at least in one respect, the perpetrators of the terrorist attacks have achieved their goal: He has been able to impose their point of view on society.

こういう現実を見ると、ブログで主張を繰り返しているだけの自分(江端)が、バカバカしくなってしまいます。

These realities make me (Ebata) feel foolish for just repeating my assertions on my blog.

そして、私のように考える人間は、私以外にも結構多いのではないか、と思うのです。

And I think that there are quite a few people who think like I do, besides me.

『SNSでは炎上程度でしかない。街頭デモをしてもニュースにもならない。ニュースになるだけの賛同者を得るカリスマもロジックも弁舌も、私にはない』と考える人間が、

A person who think that "I just can make a flame on SNS. Even if I demonstrate in the streets, it won't make the news. I don't have the charisma, logic, or oratory skills to get enough supporters to make the news", come to think

―― 結局のところ、要人テロが一番てっとり早い

"After all, terrorism of dignitaries is the fastest way"

と考えるのは、まあ、普通に考えて、普通だと思うのです。

I think it is, well, normal to think that.

-----

昔、先輩に『原則として、自爆テロを防ぐ方法はない』と教えて貰ったことがあります。

I had a senior colleague once tell me, 'In principle, there is no way to prevent suicide bombers.

―― 政治、宗教、野球、恋愛については、人と議論してはならない

残念ながら、私には、これを解決する方法を思いつけません。

Unfortunately, I can't think of a solution to this.

2022/09,江端さんの技術メモ

こっちはPythonで書いたファジィ(Fuzzy)推論コードです。



# -*- coding: utf-8 -*-
# 上記の一行がないと、コメント分の和文も全部エラーになる 

# シンプルファジィ推論プログラム ver0.0 2015年12月15日
# シンプルファジィ推論プログラム ver0.1 2023年04月20日 print文の仕様変更対応

# メンバーシップ関数は、前件部、後件部ともに3つに固定した単純なもの
# 推論方式は、単純なmin-max重心法のみ



class condition_MF:
    
    center = 0
    width =  100
    PV ="LESS"

    def __init__(self, center, width, PV):
        self.center = center
        self.width = width
        self.PV = PV

    # x,yは、メンバーシップ関数上の座標を示す
    def func(self, x):
        if (self.PV == "LESS"):
            if (x <= self.center - self.width):
                y = 1.0
            elif (x <= self.center):
                y = - 1.0 / self.width * (x - self.center)
            else:
                y = 0.0        
        elif (self.PV == "ZERO"):
            if (x <= self.center - self.width):
                y = 0.0
            elif (x <= self.center):
                y = 1.0 / self.width * (x - self.center) + 1.0
            elif (x <= self.center + self.width):
                y = -1.0 / self.width * (x - self.center) + 1.0
            else:
                y = 0.0       
        elif (self.PV == "MORE"):
            if (x <= self.center):
                y = 0.0
            elif (x <= self.center + self.width):
                y = 1.0 / self.width * (x - self.center)
            else:
                y = 1.0
        
        return y

class action_MF:
    center = 0 # 値はダミー
    width =  100 # 値はダミー
    PV ="ZERO" # 値はダミー
    y = 0.0 # 最大値で更新されていく
    x = 0.0 # 値はダミー

    def __init__(self, center, width, PV):
        self.center = center
        self.width = width
        self.PV = PV

        if (self.PV == "LESS"):
            self.x = self.center - self.width
        elif (self.PV == "ZERO"):
            self.x = self.center
        elif (self.PV == "MORE"):
            self.x = self.center + self.width
        else:
            print ("error")

    # yを最大値で更新していく
    def func_Max(self,b):
        self.y = max(b, self.y)

    # X座標を返す
    def func_X(self):
        return self.x

    # (最大値で更新された、最後の)Y座標を返す
    def func_Y(self):
        return self.y

temp_High = condition_MF(20.0, 10.0, "MORE") # 温度が高い
temp_Middle = condition_MF(20.0, 10.0, "ZERO") #温度が普通
temp_Low = condition_MF(20.0, 10.0, "LESS")# 温度が低い

humi_High = condition_MF(50.0, 20.0, "MORE") # 湿度が高い
humi_Middle = condition_MF(50.0, 20.0, "ZERO") #湿度が普通
humi_Low = condition_MF(50.0, 20.0, "LESS")# 湿度が低い

switch_High = action_MF(0.0, 1.0, "MORE") # エアコンの温度設定を上げる("+1"にする)
switch_Middle = action_MF(0.0, 1.0, "ZERO")# エアコンの温度設定に何もしない("0"にする)
switch_Low = action_MF(0.0, 1.0, "LESS") # エアコンの温度設定を下げる("-1"にする)


# 入力値(温度27度、湿度57%)
t = 35.0
h = 80.0

# (1)「もし、温度が高くて、湿度が高ければ、エアコンの温度設定を下げる」
a1 = min(temp_High.func(t),humi_High.func(h))
print (a1)
switch_Low.func_Max(a1) 

print ("Low") 
print (switch_Low.func_Y()) 

# (2)「もし、温度が普通で、湿度が高ければ、何もしない」
a2 = min(temp_Middle.func(t),humi_High.func(h))
switch_Middle.func_Max(a2) 

print ("Middle") 
print (switch_Middle.func_Y()) 

# (3)「もし、温度が高くて、湿度が普通なら、エアコンの温度設定を下げる」

a3 = min(temp_High.func(t),humi_Middle.func(h))
switch_Low.func_Max(a3) 
print ("Low") 
print (switch_Low.func_Y()) 

# (4)「もし、温度が低くて、湿度が低ければ、エアコンの温度設定を上げる」
a4 = min(temp_Middle.func(t),humi_Low.func(h))
switch_High.func_Max(a4) 
print ("High") 
print (switch_High.func_Y()) 

# (5)(追加)もし温度が普通で、湿度が普通なら、何もしない
a5 = min(temp_Middle.func(t),humi_Middle.func(h))
switch_Middle.func_Max(a5) 
print ("Middle") 
print (switch_Middle.func_Y()) 

# 重心値を求める
# (ルールが推論空間を網羅していないと、ゼロ割が発生することがあるので注意)

reasoning =  (switch_High.func_X() * switch_High.func_Y()  + switch_Middle.func_X() * 
switch_Middle.func_Y()  + switch_Low.func_X() * switch_Low.func_Y()) / (switch_High.func_Y()  + switch_Middle.func_Y()  + switch_Low.func_Y())

print ("\n reasoning")
print (reasoning)

元ネタはこちら(クリックするとページに飛びます)。

ファジィ推論

2017,江端さんの忘備録

本日は、コラムがリリースされた日なので、日記はお休みです。

Today, new my column is released, so I take a day off.

"Over the AI(13) ---- beyond a reach of our imagination of AI"

Artificial intelligence remains weak ---- "How to make "strong AI" with fear of death

-----

処世術として、良く言われることの一つに

There is a famous "how to get on in the world"

―― 政治、宗教、野球、恋愛については、人と議論してはならない

"Don't discuss politics, religion, baseball and love affair to others"

というものがあり、私は、このフレーズを守って生きています。

I have kept this phrase absolutely.

(まあ、時々、これらのネタについて『書い』てはいるのですが、他人の『議論』はしません)

(Sometimes I write about these issues, however, I never discuss them)

-----

さて、実は、今回のコラムは、EE Times Japan編集部の担当者のMさんより、以下の文章について、削除を依頼されました。

In fact, at this time, Ms.M who is working on my columns at the EE times Japan office, asked me to delete the following lines.

私は、このMさんの判断を「正しい」と思いました。

I could agree with her, because I think that her judgement was really right.

「宗教」については、いらんことは書かないに限ります。

The best thing to do is that "we don't talk about "religion"".

この辺については、Mさんも私もよく分かっているので、「あ・うん」の呼吸で合意しました(と思う)。

Both Ms.M and I know well, so we can come to compromise about this issue easily,

----

ですが、折角書いたので、私の日記の方で復活させてみます。

Now that I've taken the trouble to make the writing, so I want to attempts to revive.

こんな内容でした(英語版は省略します)。

like the following(I omitted the English version).

============= ここから =============

江端:「『あの世』やら『来世』なるものが同時に2つ以上存在する、などと言っている宗教は1つもないのだから、そういう理不尽で不合理な裁判システム(最後の審判)を採用しているシステムは「併存できない」と考える方が自然だろう?」

次女:「確かに」

江端:「さらに腹が立つのが、イスラム教のジハード(聖戦)という概念だ。イスラム教の教義の為の戦争で、 ―― イスラム原理主義者の一部のカルトたちは「自爆テロ」も「ジハード」であると言い張っているんだけど ―― 死んだら、手続、裁判一切不要で、天国(*1)(*2)直行便が確定するんだ」

(*1)コーラン0節から24節の江端的解釈→『至福の楽園の中に住み、永遠の若さを保ち、24時間、飲み放題食い放題サービスを受けながら、美しい美女たちを自分の回りにはべらせ続けられる』(https://ja.wikipedia.org/wiki/天国 (イスラーム))

(*2)イスラム教の開祖の一人によるコーラン第55章への言及→『天女達(フーリー)は、天国に来たイスラーム信者の男性のセックスの相手し、一人につき72人のフーリーが相手をする。彼女たちは永遠の処女であり、セックスを行い処女膜が破れてもすぐさま再生する』(https://ja.wikipedia.org/wiki/フーリー)

次女:「・・・」

江端:「こんな理不尽(で下品)な話があると思うか? もしパパが、そんな馬鹿げたテロの巻き添えで殺されたら、パパは、たった一人でも、その「天国」なるところに報復テロを仕掛けにいくぞ(*3)」

(*3)こういう俗物で下品な天国のイメージで、カルト化した信者(特に若人)の自爆テロへの心理的しきい値を下げさせていることは事実のようです。しかし、本来、イスラム教とは、、唯一神のもとでの人間の完全フラットな平等と自由と、世界平和を説く宗教で ―― そして、イスラム教徒のほとんどは、そういう方々です。

次女:「ちょ、ちょっと。パパ、怖いよ。うん、「パパは『あの世』とか『来世』を信じていない」でいいよ」

============= ここまで =============

2023,江端さんの忘備録

私は、高度経済成長期の日本(の後半)と、その後の凋落を観測し続けてきました。

I have continued to observe Japan (in the second half of its high economic growth period) and its subsequent decline.

特に、オイルショック(1973年)あたりの物価の高騰については、子どもながら『何かとんでもないことが起こっているんだ』と実感したものです。

In particular, the sharp rise in prices around the oil crisis (1973) made me realize, even as a child, that something terrible was happening.

 

 

それでも、『なんとなく、そのように感覚していた』というレベルを越えません。

Still, it does not go beyond the level of 'somehow I had a sense of it that way.

-----

今、私は、物価高を『実感』として感じています。

I am now 'really feeling' the high prices.

- トーストのパンが小さい

- Toast bread is small.

- ほうれんそうの値段の乱高下が激しい

- The price of spinach is wildly fluctuating.

- 長ネギ、玉ネギが手に入らないことが多い

- Onions and leeks are often unavailable

- 最近、『鶏モモ』ではなく『ささみ』ばかりを食べている

- Lately, I have been eating only "white meat" instead of "chicken thighs".

-----

という訳で、私、新しいダイエットを提唱してみたいと思います。

Therefore I would like to advocate a new diet.

―― インフレダイエット

"Inflation diet"

世界経済と連動する"ダイエット"としては、多分、世界初ではないかと自負しています。

I am proud to say that this is probably the first "diet" in the world that is linked to the global economy.

さあ、反論のある奴は、かかってこい。

 

2016,江端さんの忘備録

本日はコラムがリリースされた日なので、日記はお休みです。

Today, a new column is released, so I take a day off.

"Let's turn the world by "Number" Diet (28)

Now I would like to ask you "do you really need your diet".

ダイエットシリーズ、最終回です。

This is the final of the series.

-----

総括 ――

Summary are,

(1)「楽々ダイエット」なるものは存在しない。

(1) "Easy diet" does not exist.

(2)「喰い過ぎれば太り、喰い控えれば痩せる」に一切の例外なし。

(2) The principle of "if too eating, being fat, if less eating, losing weight" is absolute.

―― です。

さあ、反論のある奴は、かかってこい。

Come on , Guy with a rebuttal.

1年分のデータと、データに裏づけられた仮説検証のシミュレーションコードと、その計算結果で、丁重にお出迎え致します。

Respectfully we will pick you up, with one year's worth of data,simulation program of hypothesis testing that has been backed by data, and the result of the calculation.

2023,江端さんの忘備録

私たちは、多様性を認めなければならない世界に生きていますが、多様性を個人が理解するというのは難しく、社会が認めるのはさらに難しいです。

We live in a world that must recognize diversity, but it is difficult for individuals to understand diversity, and even more difficult for society to recognize it.

マイノリティーの人々は、世間の無理解に対する根気強い、長期間(四半世紀から100年オーダ)の闘いが必要となります。

Minorities will need a persistent, long-term (quarter century to century order) struggle against public incomprehension.

しかし、個人が(×社会が)多様性を認める手っ取り早い方法があります。

However, there is a quick way for individuals (x society) to recognize diversity.

マイノリティの当事者になることです。

It is to be a minority party.

-----

仕事の出張帰りの新幹線の中、3席シートの通路側に座っていた時のことです。

I was sitting on the aisle side of a three-seat seat on the Shinkansen bullet train on my way home from a business trip.

窓際の席に座っている、私と同程度の年齢のごっつい風体の男性が、数枚のスナップ写真を熱心に見ていました。

A burly-looking man about my age, seated by the window, was looking intently at several snapshots.

私がトイレに立ったとき、たまたま、その写真が目に入りました。

When I stood up to use the restroom, I happened to see that picture.

それは、その男性とアイドルコスチュームで装ったティーン風の女の子が、笑顔で一緒に写っている写真でした。

It was a picture of the man and a teen-like girl dressed in an idol costume, smiling together.

女の子がアイドルコスチュームさえ着ていなければ、明らかに親子、という感じの写真でした。

If only the girls weren't wearing idol costumes, they were clearly parent and child.

『新幹線に乗って、アイドルを追っかけるおっさん』というのは、もはや珍しい存在ではありません ―― アニメとか小説の中では。

The "old man on a bullet train, chasing after idols" is no longer an uncommon existence -- in anime and novels in my mind.

しかし、現実に生身の人間を見ると、ちょっとビックリというかビビってしまう ―― これは、私の人間としての器の小ささと言えましょう。

However, when I see a live person in real life, I am a bit surprised or scared -- this is my small human capacity, I guess you could say.

アイドルとのツーショットのスナップ写真を眺める中年から初老の男性を、一月に1回見るくらいの頻度があれば、私も「引く」ことはなくなると思うのですが。

If I could see a middle-aged to early-aged man looking at snapshots of himself with his idols once a month, I would not "put off" as often.

しかし、それには、これからも長い時間が必要になるだろう、と思いました。

But it will take a long time from now, I thought.

-----

で、思ったんですよ。

And I thought that,

この多様性を理解するためには、私自身が『アイドルの追っかけ』に参入しなければならない、と。

In order to understand this diversity, I have to enter the "idol chase" myself.

というわけで、一応、人生のToDoリストには入れているのですが、現時点では、そのリストの最下位くらいです。

So, in a nutshell, I have it on my to-do list for life, but at this point, it is about at the bottom of that list.

『"紅天女"なんぞに、どれだけのコストと時間をかけているんだ?』と

2017,江端さんの忘備録

ガラスの仮面に出てくる「大都芸能」は、大丈夫なんだろうか ――

"Daito-Performing Arts Co." in a comic "Mask of glass" is O.K. isn't it?

と、いらん心配をしています。

I am worried about unnecessary.

まず、海外展開の場面が出てこない。

First of all, scenes of overseas expansion do not come out.

アイドルビジネスに参入している様子もない。

No appearance of entering idle business.

インターネットへのコンテンツビジネスも、まったくやっている様子ないし。

He seems not to be interested in the Internet content business at all.

"紅天女"などという、大衆受けしそうにない舞台演劇に、こともあろうに、社長が固執している。

As the case may be, the president sticks to a stage play which is unlikely to be popular, "Red Milky Woman".

というか、そもそも「芸能プロダクション」なんてビジネスが、今時立ち行くのか?

To begin with, will "entertainment production" go well now ?

-----

『"紅天女"なんぞに、どれだけのコストと時間をかけているんだ?』と ――

"How much money and time are you spending on "Red Milky Woman"? "

よく、株主は怒り出さないなぁ、と思う。

Why do shareholders get angry ?

私が株主なら、速水真澄の解任動議を発議する。

If I were a shareholder, I would make a motion to dismiss "Masumi Hayami".

2023,江端さんの技術メモ

package main

import (
	"fmt"
)

// (1)
var m = make(map[int]int)  // (2)をコメントアウトするならこっちを使う

func main() {

	// (2)
	//m := map[int]int{} // (1)をコメントアウトするならこっちを使う

	m[3124] = 9
	m[1992] = 2
	m[2020] = 3

	// キーのみ取り出す
	for key := range m {
		fmt.Println(key)
	}

	//3124
	//1992
	//2020

	fmt.Println()

	// キーと値
	for key, value := range m {
		fmt.Println(key, value)
	}
	fmt.Println()

	//1992 2
	//2020 3
	//3124 9

	// 値のみ必要な場合
	for _, value := range m {
		fmt.Println(value)
	}

	//9
	//2
	//3

	fmt.Println()

	// ループの回数を数える
	i := 0
	for key, value := range m {
		fmt.Println(key, value)
		i++
	}

	//3124 9
	//1992 2
	//2020 3

	fmt.Println()
	fmt.Println("delete(m, 1992)")
	delete(m, 1992)
	for key, value := range m {
		fmt.Println(key, value)
	}

	//delete(m, 1992)
	//2020 3
	//3124 9


	fmt.Println()
	fmt.Println("add as m[2999] = 2")
	m[2999] = 2
	for key, value := range m {
		fmt.Println(key, value)
	}

	//add as m[2999] = 2
	//3124 9
	//2999 2
	//2020 3

	_, ok := m[100]
	if ok {
		fmt.Println("OK")
	} else {
		fmt.Println("NG")
	}

	// NG

	_, ok = m[2999]
	if ok {
		fmt.Println("OK")
	} else {
		fmt.Println("NG")
	}

	// OK

	fmt.Println(m)
	// map[2020:3 2999:2 3124:9]

	m[2020]++

	fmt.Println(m)
	// map[2020:4 2999:2 3124:9]



}

2023,江端さんの技術メモ

研究室の学生さんたちに負荷テストに協力してもらっています。

今、"cannot parse invalid wire-format data" のエラーでGTFS_HUBのダウンを確認しました。

PrumeMobileの方は、そのままにして、GTFS_HUBの再起動をかけました。

(以下、後日対応)

2023,江端さんの忘備録

最近、この問題でずっと困っていました。

Recently, I have been in trouble about this problem.

repeated read on failed websocket connection (一応解決)

金曜日の日深夜(正確には土曜日の未明)に『これで動くはず』というコードを仕込んで、動くことを祈りながら、床につきました。

Last Friday midnight(early Saturday morning to be precise), I completed the code that "should be worked" I expected and went to bed.

あの時点で、プログラムを走らせたら、そのデバッグに取り組み始めて、完全に徹夜作業になって、結果として、体調を崩すという確信があったからです。

If I would try to execute the program, I should have started debugging for all night, and I confirmed that I was convinced that I would get sick.

ですから、土曜日の朝、2箇所程度の修正で動いた時は、本当に嬉しかった。

Therefore, I was very happy that I confirmed the program worked well with just two modifications.

このプログラムを、AWS(正確には、廉価版AWSであるAmazon Lightsail)にアップして稼動実験を続けていました。

I uploaded this program to AWS (correctly, Amazon Lightsail, a low-cost version of AWS) and continued the test run.

取り敢えず、サーバ稼動することが確認できxたので、月曜日に同僚やゼミ生に協力して貰って、負荷テストをしたいと思っています。

Anyway, I could confirm that this program is working as a server, I am going to ask my workers and students to do the test run.

-----

このサーバ化は、実は仕事でもなく、単に興味でやっています。

The reason I am trying to make the server, is not for work but for my interest.

誰に命じられたという訳でもなく、私の直感が『将来、これでラクできる』と言っているだけですが。

No one ordered me to do that, it is just that my intuition is telling me "this wil make my work easier in the future"