Last active
December 10, 2015 21:18
-
-
Save hikui/4494021 to your computer and use it in GitHub Desktop.
你永远不知道颜色在别人大脑中的反映是不是和自己一样
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding:utf-8 | |
class Object: | |
pass | |
class Person: | |
def __init__(self): | |
self.feeling_colorname_map = dict() | |
self.wavelength_feeling_map = dict() | |
def learn_to_say_color_name(self,color_name,wave_length): | |
""" | |
我们就是这样学习颜色的。颜色的波长映在大脑里产生一个feeling | |
同时我们接收到一个表达颜色的词汇 | |
我们就建立起feeling-colorname的关联 | |
""" | |
feeling = self.wavelength_feeling_map[wave_length] | |
self.feeling_colorname_map[feeling] = color_name | |
def see_an_object(self,obj): | |
wave_length = obj.wave_length | |
#颜色映在大脑里产生feeling的瞬时记忆 | |
self.feeling = self.wavelength_feeling_map[wave_length] | |
def speak_out_the_color(self): | |
color_name = self.feeling_colorname_map[self.feeling]; | |
print 'it is '+color_name | |
def what_is_the_color_of_an_object(self,obj): | |
self.see_an_object(obj) | |
self.speak_out_the_color() | |
class PersonA(Person): | |
def __init__(self): | |
Person.__init__(self) | |
#feeling是大脑中的确切感知 | |
self.wavelength_feeling_map = {"#ff0000":1,"#00ff00":2,"#0000ff":3} | |
class PersonB(Person): | |
def __init__(self): | |
Person.__init__(self) | |
self.wavelength_feeling_map = {"#ff0000":2,"#00ff00":1,"#0000ff":3} | |
anObj = Object() | |
anObj.wave_length = "#00ff00"; | |
personA = PersonA() | |
#learn | |
personA.learn_to_say_color_name("red","#ff0000") | |
personA.learn_to_say_color_name("green","#00ff00") | |
personA.learn_to_say_color_name("blue","#0000ff") | |
personA.what_is_the_color_of_an_object(anObj) | |
personB = PersonB() | |
#learn | |
personB.learn_to_say_color_name("red","#ff0000") | |
personB.learn_to_say_color_name("green","#00ff00") | |
personB.learn_to_say_color_name("blue","#0000ff") | |
personB.what_is_the_color_of_an_object(anObj) | |
""" | |
假设对personA和personB进行黑盒测试,因为输入输出是一样的,你无法知道内部的feeling是多少, | |
你永远不能通过被测者对于颜色的语言描述来确定feeling的实际量是多少,你也无法进入被测者的大 | |
脑中体验这个feeling。所以feeling是不可测的。 | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment