08/10/2024
import random
# Knowledge Base (Example - Expand this significantly)
knowledge = {
"philosophy": "The unexamined life is not worth living. - Socrates",
"science": "The most incomprehensible thing about the universe is that it is comprehensible. - Albert Einstein",
"history": "Those who cannot remember the past are condemned to repeat it. - George Santayana"
}
def athena_response(user_input):
"""
Generates Athena's response based on user input.
"""
user_input = user_input.lower() # For case-insensitive matching
# Simple Keyword Matching (Start with broad topics)
for keyword in knowledge:
if keyword in user_input:
return knowledge[keyword]
# If no keyword match, provide a general, wise-sounding response
general_responses = [
"That is a question worth pondering.",
"Knowledge is a journey, not a destination.",
"Seek wisdom, but be mindful of its limits."
]
return random.choice(general_responses)
# Example Interaction
while True:
user_input = input("You: ")
if user_input.lower() == "quit":
break
response = athena_response(user_input)
print("Athena:", response)