Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in child_ai.py hard to understand the curiosity_behavior function #21

Open
aymeric75 opened this issue Sep 27, 2023 · 0 comments
Open

Comments

@aymeric75
Copy link

Hi,

From child_ai.py

we have


# Initial data preparation
data_motivation = {
    'Time': [1], 
	'Motivation': ['Reflex'],
	'Need': ['Pay Attention on Unusual Event'],
	'Action': ['Research Unusual Event'],
    'Result': ['Understand Unusual Event'], 
    'Status': [[['Visual', 'Other'],['Hearing', 'Other'],['Touch', 'Other']]]
    }
Motivation_Global = pd.DataFrame(data_motivation)

then


# Business logic of curiosity behaviour of Child
def curiosity_behavior(Start, End):
    for t in range(Start, End+1):
        Motivation_item = Motivation_Global[Motivation_Global['Time']==t]
        if Motivation_item.size != 0:
            Is_Result_Achieved = PDCA_func(Motivation_item)
            if Is_Result_Achieved:
                print("Result is achieved! Time: ", t)
            t = t + 1
    print("curiosity_behavior ends.")

Motivation_Global['Time'] is equal to [1] , so basically [1] will never be equal to 1 or 2 or 3 etc. that's why I don't understand this line:
Motivation_item = Motivation_Global[Motivation_Global['Time']==t]

Furthermore, Motivation_Global['Time']==t will return either True or False, but Motivation_Global[True] or Motivation_Global[False] does not exists...

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant