Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
898ca06
feat: neighbour generation
lmProgramming Apr 16, 2025
655a690
feat: move generation
lmProgramming Apr 16, 2025
204d065
feat: basic human agent player
lmProgramming Apr 16, 2025
12f0d59
feat: added move, replace, pretty print
lmProgramming Apr 16, 2025
7e955f7
feat: created game, agents interface and human concrete
lmProgramming Apr 16, 2025
51ec051
feat: minimax and dumb heuristic
lmProgramming Apr 16, 2025
8b288c0
feat: alpha beta prunning
lmProgramming Apr 16, 2025
d634867
feat: some bad heuristics
lmProgramming Apr 16, 2025
dd4229b
feat: get subgames helper
lmProgramming Apr 17, 2025
0222fe2
Merge remote-tracking branch 'origin/main' into lab02
lmProgramming Apr 17, 2025
17ffc21
chore: updated requirements
lmProgramming Apr 17, 2025
9caed77
feat: update workflow to trigger on lab02 branch
lmProgramming Apr 17, 2025
ebf2b54
refactor: cleaning requirements
lmProgramming Apr 17, 2025
8e68ecc
chore: update Python version to 3.12.6 in workflow
lmProgramming Apr 17, 2025
7405ad9
chore: update Python version to 3.12.6 in workflow and remove version…
lmProgramming Apr 17, 2025
050aed7
chore: update Python version in workflow to 3.10 and correct pywin32 …
lmProgramming Apr 17, 2025
aac7ff1
ci: might work
lmProgramming Apr 17, 2025
6d69c82
chore: remove pypiwin32 from requirements and update README to reflec…
lmProgramming Apr 17, 2025
edaa4dc
feat: in progress of adding heuristic helpers
lmProgramming Apr 17, 2025
fa3920d
feat: new heuristics working
lmProgramming Apr 17, 2025
4e87180
fix: tests fix
lmProgramming Apr 17, 2025
01809e5
refactor: update imports and README
lmProgramming Apr 17, 2025
e9dcdfa
feat: dynamic agent with multiple strategies
lmProgramming Apr 17, 2025
f98ea4f
feat: final heuristics
lmProgramming Apr 17, 2025
37127c0
feat: recording time and nodes
lmProgramming Apr 17, 2025
8fbd6f4
reformat: migrated board to cython
lmProgramming Apr 17, 2025
cf5d5be
chore: update requirements
lmProgramming Apr 17, 2025
8aa030b
refactor: replace print statements with logging in AlphaBeta class an…
lmProgramming Apr 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 27 additions & 22 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,40 @@ name: Python application

on:
push:
branches: [ "main" ]
branches: ["main", "lab02"]
pull_request:
branches: [ "main" ]
branches: ["main", "lab02"]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
architecture: "x64"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Cython
run: |
cd lab02
python setup.py build_ext --inplace
#- name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
cd lab02
pytest
3 changes: 3 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"MD041": false
}
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[![CI](https://github.com/lmProgramming/uni-artificial-intelligence/actions/workflows/python-app.yml/badge.svg)](https://github.com/lmProgramming/uni-artificial-intelligence/actions/workflows/python-app.yml)

# Artificial Intelligence course

## running

On Windows, you might need to additionally install:

```sh
pip install pywin32
```

### lab02

To build cython files:

```sh
cd lab02
python setup.py build_ext --inplace
```

#### Windows

I strongly recommend to make sure Python version has development options enabled
(if not, best to reinstall with them enabled)

VS XX C++ Desktop Development must also be installed
1 change: 0 additions & 1 deletion lab01/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from datetime import datetime, time
import sys
from dijkstra import dijkstra
from a_star import a_star_search
from tabu import tabu_search
Expand Down
4 changes: 1 addition & 3 deletions lab01/path_utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from geopy.distance import geodesic
from geopy.distance import geodesic # type: ignore
import models
from functools import lru_cache
from datetime import time
from bisect import bisect_left
from utils import seconds_to_time


@lru_cache(maxsize=None)
Expand Down
Loading