0
0
Agentic_aiml~10 mins

AGI implications for agent design in Agentic Ai - Interactive Code Practice

Choose your learning style8 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define an AGI agent's basic decision function.

Agentic_ai
def decide_action(state):
    return [1]
Drag options to blanks, or click blank then click option'
Arandom.choice(actions)
Bchoose_best_action(state)
Cprint(state)
DNone
Attempts:
3 left
2fill in blank
medium

Complete the code to update the agent's knowledge after receiving new information.

Agentic_ai
def update_knowledge(agent, info):
    agent.knowledge_base.[1](info)
Drag options to blanks, or click blank then click option'
Aclear
Bremove
Cappend
Dignore
Attempts:
3 left
3fill in blank
hard

Fix the error in the agent's reward calculation function.

Agentic_ai
def calculate_reward(state, action):
    reward = state.get('value', 0) [1] action.cost
    return reward
Drag options to blanks, or click blank then click option'
A-
B+
C*
D/
Attempts:
3 left
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps states to their rewards if reward is positive.

Agentic_ai
rewards = {state: [1] for state, action in actions.items() if [2] > 0}
Drag options to blanks, or click blank then click option'
Acalculate_reward(state, action)
Bstate.value
Daction.cost
Attempts:
3 left
5fill in blank
hard

Fill all three blanks to define an AGI agent's learning step with state, action, and reward updates.

Agentic_ai
def learning_step(agent, state, action):
    reward = [1](state, action)
    agent.memory.[2]((state, action, reward))
    agent.policy = [3](agent.memory)
Drag options to blanks, or click blank then click option'
Acalculate_reward
Bappend
Cupdate_policy
Dpredict
Attempts:
3 left