2020/08,江端さんの忘備録

私は、「ディズニーランドに興味がない」と思われているようですが、正しくありません。

You seem to think I'm "not interested in Disneyland" but that's not correct.

ディズニーランドは、待ち時間戦略、最短経路問題、 人流制御問題、とかも含めて、最新鋭の数学が投入されていることでも有名です。

Disneyland is also famous for its state-of-the-art mathematics, including wait time strategy, shortest path problem, human flow control problem, and so on.

しかも、最高レベルの安全工学技術が投入されているのも知っています。

Moreover, I know that the highest level of safety engineering technology has been put in place.

私から見れば、ディズニーランドは、最高レベルの数学とIT技術と、そして、制御工学、機械工学、人間工学、経営工学からなる、巨大トータルシステムです。

From my point of view, Disneyland is a huge total system, consisting of the highest level of mathematics and information technology, and control engineering, mechanical engineering, ergonomics and management engineering.

そして、そのシステムが、私達に仕向ける「行動変容プログラム」を「推測」し「欺く」というトライアルは ―― その勝敗はどうあれ ―― 結構な快感だったりします。

And it's quite pleasant to try to "guess" and "fool" the system's behavioral change program that caters to us, -- whether it's a win or a loss.

だから、ディズニーランドは楽しい ―― 見ているだけでも。

So, Disneyland is fun -- even if it's just to watch.

-----

ただ、疲れるから、わざわざ出かけるのは面倒です。

However, it is tiring to go out because it makes me tired.

テーマパークの"システム"を知る、という観点では、京都アニメーションの「天城ブリリアントパーク」は結構面白いです。

In terms of getting to know the "system" of theme parks, Kyoto Animation's "Amagi Brilliant Park" is quite interesting.

部屋に閉じ込もっていられますし。

I can lock myself in my room.

2020/08,江端さんの技術メモ

いらんことしなければいいのですが、function.phpとかをいじって、何度かWPを壊しかけました。

という訳で、バックアップツールの"All-in-One WP Migration"を入れました。

後は、"ファイル"を選んで、PCに保存できます。

以上

2020/08,江端さんの忘備録

最近のウィークエンドは、私は、ウィークデーより疲れ果てています。

I'm more exhausted at not weekdays but weekend.

ええ、件(くだん)の「量子コンピュータ」の調査です。

Yes, it's for research on this quantum computer.

-----

私、「訳の分からん現象は、実際に計算してみろ」を信条としておりまして、実際にこれまで、

I'm a firm believer in "If I can't understand the phenomenon, try to calculate it".

For example,

■モンティ・ホール問題(ベイズ推定)

- Monty Hall problem (Bayesian estimation)

■米国大統領選挙(3回連続シリーズ)

- U.S. Presidential Election (3-part series)

などの仕組みをコンピュータに突っ込んで、その計算結果から、その理屈を問い詰める、というプロセスを公開してきました。

I have published a working process that involves plugging these mechanisms into a computer and then questioning the logic of the calculations.

-----

昨日も、「解説を完全再現した」と確信している検証用のプログラムを作成したのですが、全く期待した値が出てこなくて、頭を抱えています。

I created a verification program yesterday that I'm sure "fully replicated" the commentary, but I'm still scratching my head because I'm not getting the values I expected at all.

簡単なプログラムであり、その計算結果も私にも妥当と思えました。

It's a simple program and the results of its calculations seemed reasonable to me as well.

(大数の法則では「当然にこうなるだろう」という結果)

(The law of large numbers says that this is the natural result.)

ですので、多分、解説の中に、非常に重要な説明が欠けている(か、私が絶望的に誤解している)のだと思います。

So maybe I'm missing a very important explanation in the commentary(or I'm hopelessly misunderstanding).

誰か、

Someone who

(1)「BELLの不等式(の破れ)」に詳しくて

(1) is familiar with "BELL's Inequality (Breaking of the BELL)

(2)私のコードを読める人(今回はGolangで書いてみました)

(2) can read my code (in Golang this time).

は、何卒、私に暖かい支援の手を差し延べて下さい。

will give me the help hopefully

『江端さん。日常生活で観測可能な事象のシミュレーションでは、局在性/非局在性を立証することはできませんよ』と決めつけて頂いても結構です。

Even if you say "Ebata-san. Localization cannot be proven through simulations of everyday observable events", it is going to help me.

-----

ともあれ、この「量子シリーズ」そろそろ閉じたいと思います。

Anyway, I'd like to close this "Quantum Series" soon.

これ以上は、私の知力と体力、特に「体力」が持ちそうにありません。

It is unlikely that my intellect and stamina will be sustained any longer. Particularly "stamina" is.

2020/08,江端さんの技術メモ

を見て、コーディングしてみたのですが、全然思うような結果になりません。

サンプル数を増やすと、どんどん0に近づいていくんだけど(そりゃそうだ)、サンプル数を減らした方が、2越えは発生するけど、解説の内容と会いません。

以下のコーディングで致命的に変な点があったら、どなたかご教示下さい。

package main

import (
	crand "crypto/rand"
	"fmt"
	"github.com/seehuhn/mt19937"
	"math"
	"math/big"
	"math/rand"
	"time"
)

type Scratch_Card struct {
	 UpperLeft  int64
	 LowerLeft  int64
	 UpperRight int64
	 LowerRight int64
}

var sc Scratch_Card

func main() {
	//計算開始日時
	started := time.Now()

	//乱数の設定
	seed, _ := crand.Int(crand.Reader, big.NewInt(math.MaxInt64))
	rng := rand.New(mt19937.New())
	rng.Seed(seed.Int64())


	for k := 0; k < 1; k++ {

		var pattern1_count, pattern2_count, pattern3_count, pattern4_count int64;
		var pattern1_sum, pattern2_sum, pattern3_sum, pattern4_sum 		   float64;
		var rightCat,rightPattern int64
		var leftCat,leftPattern int64




		//fmt.Println(sc.UpperLeft,sc.UpperRight)
		//fmt.Println(sc.LowerLeft,sc.LowerRight)
		//fmt.Println()


		for i := 0; i < 400; i++ {

			// スクラッチカード1枚を作る
			sc.UpperLeft  = rng.Int63()%2
			sc.LowerLeft  = rng.Int63()%2
			sc.UpperRight = rng.Int63()%2
 			sc.LowerRight = rng.Int63()%2


			// スクラッチカードの左側を削る
			if rng.Int63()%2 == 0 {   // 上を削ることになった
		  	   leftPattern = 0	      // 左上が削られたことのフラグ
		   	   leftCat = sc.UpperLeft // 左上のネコがスクラッチから表われる
			} else {                  // 下を削ることになった
		   	   leftPattern = 1	      // 左下が削られたことのフラグ
		   	   leftCat = sc.LowerLeft // 左下のネコがスクラッチから表われる
		    }

		    // スクラッチカードの右側を削る
		    if rng.Int63()%2 == 0 {    // 上を削ることになった
		       rightPattern = 0	       // 右上が削られることになったフラグ
		       rightCat = sc.UpperRight// 右下のネコがスクラッチから表われる
		    } else {                   // 下を削ることになった 
		       rightPattern = 1        // 右下が削られることになったフラグ
		       rightCat = sc.LowerRight// 右下のネコがスクラッチから表われる	   
		    }

		    ////////////////////

		    // ○○
		    // ××

		    if leftPattern == 0 && rightPattern == 0 {
		        pattern1_count += 1      // パターン1の回数の加算
		   
		       if leftCat == rightCat { // マークが同じ
		   	      pattern1_sum += 1
		       } else {                 // マークが違う 
		   	       pattern1_sum -= 1
		       }
		    }

		    // ××
		    // ○○
		    if leftPattern == 1 && rightPattern == 1 {
		       pattern2_count += 1   // パターン2の回数の加算   
		   
		       if leftCat == rightCat { // マークが同じ
		   	      pattern2_sum += 1
		       } else {                 // マークが違う 
		   	       pattern2_sum -= 1
		       }
		    }

			// ×○
			// ○×

		   if leftPattern == 1 && rightPattern == 0 {
		       pattern3_count += 1  // パターン3の回数の加算   
		   
		       if leftCat == rightCat { // マークが同じ
		   	      pattern3_sum += 1
		       } else {                 // マークが違う 
		   	       pattern3_sum -= 1
		       }
		    }

   		    // ○×
		    // ×○

		   if leftPattern == 0 && rightPattern == 1 {
		       pattern4_count += 1  // パターン4の回数の加算   
		   
		       if leftCat == rightCat { // マークが同じ
		   	      pattern4_sum += 1
		       } else {                 // マークが違う 
		   	       pattern4_sum -= 1   
		       }
		   }
	   }

	   fmt.Println("pattern1_count ", pattern1_count, "pattern1_sum", pattern1_sum)
	   fmt.Println("pattern2_count ", pattern2_count, "pattern2_sum", pattern2_sum)
	   fmt.Println("pattern3_count ", pattern3_count, "pattern3_sum", pattern3_sum)
	   fmt.Println("pattern4_count ", pattern4_count, "pattern4_sum", pattern4_sum)

	   var pattern1_ave,pattern2_ave,pattern3_ave,pattern4_ave float64

	   pattern1_ave = pattern1_sum / float64(pattern1_count)
	   pattern2_ave = pattern2_sum / float64(pattern2_count)
	   pattern3_ave = pattern3_sum / float64(pattern3_count)
	   pattern4_ave = pattern4_sum / float64(pattern4_count)
		
	   fmt.Println()

	   fmt.Println("pattern1_ave ", pattern1_ave)
	   fmt.Println("pattern2_ave ", pattern2_ave)
	   fmt.Println("pattern3_ave ", pattern3_ave)
	   fmt.Println("pattern4_ave ", pattern4_ave)

	   fmt.Println()
	  }

	//計算終了日時から計算開始日時を差し引いて、経過時間を出力
	fmt.Println("Elapsed: ", time.Now().Sub(started))
}

2020/07,江端さんの技術メモ

以前、書いていた投稿を編集しなおして、その編集の最新日時にしたいというニーズは、私の中では結構高くて、色々なプラグインを入れて試していたのですが、上手く動きませんでした(多分、phpファイルをいじっているからだろうなぁと思っていますが)

とこが、気がつかなったのですが(あるいはWPがバージョンアップしてできるようになったのか?)、今、WP5.5ではこの機能があることに気がつきました。

結構盲点だったので、メモしておきます。

以上

2020/08,江端さんの忘備録

「やはり俺の青春ラブコメは間違っている完」の第6話は、やはり、このセリフに付きるのではないでしょうか。

I guess the sixth episode of "My Youth Romantic Comedy is Wrong,As I Expected -- Final" comes down to this line

『なんだぁ!、この陽キャの承認欲求と刹那な快楽主義を満たす為だけに存在している、悪魔のイベントはぁ!?』

"What the hell! The devil's event, which exists only to satisfy the approval needs of yhou-cya(cheer persons) and to fulfill a momentary hedonism !?"

『こんなものを礼賛する奴は、大体、大学に行った時、「ウチの高校、プロムってのがあってさぁ」などと、イベサーで語り草にすることによって、あたかも自分が高校時代から、「陽キャ、ウエーィ」なものであったと、過去の・・・(聞き取れなかった)』

"Anyone who appreciates this stuff is undoubtedly, when they go to college, by telling stories in the event circle such as, "My high school has a prom", they act as if they have been a "jovial Yeeeeeee" since high school. They are going to try to pretend to be something they were...."

(# どうでも良いが、彼のセリフは本当に翻訳しにくい)

うん、よく分かる。

Yeah, I can see that.

本当に、プロムナードなどという、おぞましイベント・パーティーの風習が、我が国になくて良かったと思う。

Truly, I'm glad we don't have such a horrific event/party tradition as the Promenade in our country.

プロムが、アメリカの青春映画やテレビドラマの中で度々重要なイベントとして登場しているのを見ると、

When I see prom as a frequent and important event in American coming-of-age movies and TV dramas,

その時ばかりは、「あの国に生まれてこなかった幸せ」を噛み締めることができます。

I can deeply realize how lucky I am that I was not born in the US.

-----

ところで、彼の言う「アンチ・プロム」ですが、これは言葉のあやではなく、存在しているイベントのようです。

By the way, he says "anti-prom" but this is not a figure of speech, it seems to be an event that exists.

WikiPediaによると、

According to WikiPedia, the

『プロムはそのフォーマルな様式や人気者(主としてジョックやクイーンビー)だけが目立ちやすいイベント構成のため、一部の生徒から反発を受けており、反対集会「アンチ・プロム」(Anti-prom)が有志の生徒たちによって、しばしば開かれている』

'The prom has been opposed by some students because of its formal style and because it is an event in which only the most popular people (mainly jocks and queensbys) are likely to stand out, and opposition rallies "anti-prom" (anti-prom) are often held by volunteer students.'

とのこと。

-----

私は、ティンーンエイジャの時に、今で言うところの「陽キャ」と「陰キャ」の時代の両方を経験しております。

I have experienced both the "yhou-cya(cheer)" and "yin-cya(nerd)" era so-called, for my teenager.

私が、「陽キャ」として振る舞うことができたのは ―― 自分自身で「プロム」のようなイベントを自分で企画・立案・運営することができた時だけであり、

The only time I've been able to act as a "yhou-cya" -- when I've been able to plan, organize, and run events like "prom" on my own.

それ以外の時、例えば、私以外の誰かが企画した「プロム」のようなイベントに対しては、『巻き込まれるのは、まっぴら御免』という立ち位置でした。

At other times, for example, when it came to events like the prom, which was organized by someone other than me, my position was, 'I'm not going to get involved.

まあ、これを一言でいえば、―― 「身勝手」です。

Well, if I had to sum this up in one word -- "selfish".

ただ、「陽キャ」と「陰キャ」のどちらの立場も経験した身の上のおかげで、「陽キャ」と「陰キャ」のどちらも気持ちも、そこそこ分かる人間にはなれたと思います。

However, thanks to my personal experience of being both "yhou-cya" and "yin-cya", I think I've become a person who can understand the feelings of both "yhou-cya" and "yin-cya" to a certain extent.

つまり、「人間は、本質的に理解しあえない生き物である」ということと、それが故に「人間を可制御対象として取り扱うことはできない」ということを ――

In other words, "humans are essentially creatures who don't understand each other," and therefore "we can't treat them as controllable objects"

私は、かなり若い頃から知っていた、と思っています。

I've known about it since I was quite young, I think.

2020/08,江端さんの技術メモ

新規投稿を追加しようとすると、何を記入しようとしても「このブロックでエラーが発生したためプレビューできません」がでてきて、何もできなくなりました。

で、Webで調べたことを片っぱしから試してみたのですが(ブラウザのキャシュをクリア、wp-config.phpを修正しJavaScript連結を無効化する)、まったくダメダメでした。

原因を考えてみると、「昨日、WordPressのアップデートがあったなー」と思い、"WP Downgrade | Specific Core Version"というプラグインを入れて、WordPressのダウングレードを実施したのですが、状況が悪化しました

過去の投稿の編集画面が真っ白になって、何もできなくなりました。

で"WP Downgrade | Specific Core Version"を使って、元のバージョンに戻したのですが、別段状況が改善されている訳ではありません。

で、すったもんだしているうちに、どうやら、私が使わせて頂いているテーマ(Luxeritas, Luxeritas Child Theme)のバージョンが関係していそうだということが分かってきました。

FFFTPとか使って、いろいろ小手技(ファイルの入れ替え)とかやったのですが、全くダメだっだので、テーマの強制インストールを実施しました。

ここから、「本体」と「子テーマ」をダウンロードする。

でもって、「外観」→「テーマ」→「新規追加」→「テーマのアップロード」で

さきほどダウンロードしたファイルを、それぞれインストールする。

「すでにダウンロード済み」と言われれるが、構わずインストールを強行する。

で、理由は分からんけど、これで問題が発生しなくなりました。

まあ、釈然としないけど、WordPressのバージョンアップは、結構なリスクがあるので、これからは消極的に対応するようにします。