print("Hello world! - python.jsrun.net .")```python
import random
class AI:
def __init__(self):
self.performance = 0
def adjust(self, feedback):
self.performance += feedback
def generate_action(self):
if self.performance > 0:
action = random.choice(['A', 'B', 'C'])
else:
action = random.choice(['X', 'Y', 'Z'])
return action
ai = AI()
while True:
action = ai.generate_action()
print("AI选择的动作:", action)
feedback = int(input("请给出你对AI表现的评价(1表示满意,-1表示不满意):"))
ai.adjust(feedback)
print("AI的表现评价得分:", ai.performance)
choice = input("是否继续测试?(Y/N)")
if choice == 'N':
break
```