Agentic AI - Future of AI Agents
Consider this simple agent code snippet:
What is the value of
class Agent:
def __init__(self):
self.state = 0
def perceive(self, input):
self.state += input
def act(self):
return self.state * 2
agent = Agent()
agent.perceive(3)
agent.perceive(2)
output = agent.act()What is the value of
output after running this code?