게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
[질문] 팃포탯에서 Rudy Nydegger 알고리즘 설명 번역 부탁..
게시물ID : science_61765짧은주소 복사하기
작성자 : tlclover0923
추천 : 0
조회수 : 327회
댓글수 : 4개
등록시간 : 2016/12/06 02:44:24
옵션
  • 본인삭제금지

 협력의 진화를 읽고 세력권 체제에서 가장 안정적이고 인상적인 결과를 보인 루이 나이데거의 알고리즘을 찾아봤는데 중간에 해석이 매끄럽지 않아서 이해가 안 되네요..

 중간 문단 3줄이 정확하게 해석이 안 되는데 알고리즘 이해를 위해서는 여기가 핵심인 것 같습니다.

 솔직히 마지막 문단도 제대로 해석한 게 맞는지도 모르겠네요.


 알고리즘 보면 A1,A2,A3 변수 셋을 쓰는 거 같은데 어디를 어떻게 계산해서 상대방에게 대응한다는 건지..

 베이스는 범죄자의딜레마이고 둘 다 협력이면 서로 3점을 한 명만 배신일 경우 배신자만 5점 상대는 0점 상호배신인 경우 둘 다 1점을 받는 게임에 참여한 플레이어의 알고리즘입니다.


 두 번째 문단 해석 좀 부탁드립니다!!




Submitted to Axelrod’s first tournament by Rudy Nydegger.

   

The program begins with tit for tat for the first three moves, except that if it was the only one to cooperate on the first move and the only one to defect on the second move, it defects on the third move.

이 프로그램은 첫 3번의 움직임은 팃포탯처럼 시작합니다, 첫 번째 협력하고 두 번째와 세 번째 배신하는 유일한 경우를 제외하고.

After the third move, its choice is determined from the 3 preceding outcomes in the following manner.

세 번째 움직임 이후, 선택은 다음과 같은 방식의 3가지 선행 결과로 결정된다.

 

Let A be the sum formed by counting the other’s defection as 2 points and one’s own as 1 point, and giving weights of 16, 4, and 1 to the preceding three moves in chronological order.

A를 다른 것(다른 알고리즘)의 배신을 2점으로 하고 내 알고리즘을 1점으로 센 것의 합이라 하면, ?????????

The choice can be described as defecting only when A equals 1, 6, 7, 17, 22, 23, 26, 29, 30, 31, 33, 38, 39, 45, 49, 54, 55, 58, or 61.

 

Thus if all three preceding moves are mutual defection,

따라서, 만약 모든 세 번의 앞선 움직임이 상호 배신이라면,

A = 63 and the rule cooperates.

A63이고 규칙은 협조이다.

This rule was designed for use in laboratory experiments as a stooge which had a memory and appeared to be trustworthy, potentially cooperative, but not gullible.

이 규칙은 기억을 가졌고, 신뢰할 수 있으며, 잠재적 협조자이지만 속일 수는 없는 꼭두각시로서 실험실 실험에서 사용하도록 설계되었다.

 

-> 알고리즘인가봅니다.. 혹시 해석에 도움이 될지도 몰라서 올려놓습니다.

   

class Nydegger(Player):

"""

Submitted to Axelrod's first tournament by Rudy Nydegger.

 

The program begins with tit for tat for the first three moves, except

that if it was the only one to cooperate on the first move and the only one to defect on the second move, it defects on the third move. After the third move, its choice is determined from the 3 preceding outcomes in the following manner.

 

Let A be the sum formed by counting the other's defection as 2 points and one's own as 1 point, and giving weights of 16, 4, and 1 to the preceding three moves in chronological order. The choice can be described as defecting only when A equals 1, 6, 7, 17, 22, 23, 26, 29, 30, 31, 33, 38, 39, 45, 49, 54, 55, 58, or 61.

 

Thus if all three preceding moves are mutual defection, A = 63 and the rule cooperates. This rule was designed for use in laboratory experiments as a stooge which had a memory and appeared to be trustworthy, potentially cooperative, but not gullible.

 

Names:

 

- Nydegger: [Axelrod1980]_

"""

 

name = "Nydegger"

classifier = {

'memory_depth': 3,

'stochastic': False,

'makes_use_of': set(),

'long_run_time': False,

'inspects_source': False,

'manipulates_source': False,

'manipulates_state': False

}

 

def __init__(self):

self.As = [1, 6, 7, 17, 22, 23, 26, 29, 30, 31, 33, 38, 39, 45, 54, 55,

58, 61]

self.score_map = {(C, C): 0,

(C, D): 2,

(D, C): 1,

(D, D): 3}

super(Nydegger, self).__init__()

 

@staticmethod

[docs] def score_history(my_history, opponent_history, score_map):

"""Implements the Nydegger formula A = 16 a_1 + 4 a_2 + a_3"""

a = 0

for i, weight in [(-1, 16), (-2, 4), (-3, 1)]:

plays = (my_history[i], opponent_history[i])

a += weight * score_map[plays]

return a

 

 

[docs] def strategy(self, opponent):

if len(self.history) == 0:

return C

if len(self.history) == 1:

# TFT

return D if opponent.history[-1] == D else C

if len(self.history) == 2:

if opponent.history[0: 2] == [D, C]:

return D

else:

# TFT

return D if opponent.history[-1] == D else C

A = self.score_history(self.history[-3:], opponent.history[-3:],

self.score_map)

if A in self.As:

return D

return C

 

전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호