Skip to content

Prolog assignment for analyzing football league data using logic-based queries.

Notifications You must be signed in to change notification settings

IsraaXx/AI-Football-League

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI-Football-League πŸ€–

This Prolog project was created as part of an AI course assignment.
It analyzes football league data using logic-based queries.

πŸ“ Files

  • league_data.pl: Contains facts about teams, players, matches, and goals.
  • league_analysis.pl: Contains Prolog predicates that solve and analyze the league data.
  • AI - Assignment 1 [Spring 2025].pdf: The original assignment description provided by the course.

πŸ“„ View Assignment Description

βœ… Tasks Covered

  1. Get all players in a specific team
    ?- players_in_team(barcelona, L).
  2. Count how many teams are from a specific country
    ?- team_count_by_country(spain, N).
  3. Find the team with the most championship titles
    ?- most_successful_team(T).
  4. List all matches where a specific team participated
    ?- matches_of_team(barcelona, L).
  5. Count all matches where a specific team participated
    ?- num_matches_of_team(barcelona, N).
  6. Find the top goal scorer in the tournament
    ?- top_scorer(P).
  7. Find the most common position in a specific team
    ?- most_common_position_in_team(barcelona, Pos).
  8. Bonus Task: Eliminate unneeded backtracking for accurate results

πŸš€ How to Run

  1. Make sure all files are in the same folder.
  2. Open your Prolog environment (e.g., SWI-Prolog).
  3. Load both files using:
?- consult('league_data').
?- consult('league_analysis').

πŸ‘₯ Team Members

  • Israa Mohamed
  • Amany Mohamed
  • Salma Mohamed

About

Prolog assignment for analyzing football league data using logic-based queries.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages