Connect Four AI Demo
A Python demo for the connect-four-ai library.
This project uses Pygame to allow you to play against AI players of varying difficulties. For full details about the library used to create this, please see the main GitHub Repository.
Installation and Usage
To play the demo, you first need to install it using pip:
pip install connect-four-ai-demo
Then, you can use the connect-four command to load the game. This command
comes with two command-line arguments:
| Option | Short Flag | Description | Default Value |
|---|---|---|---|
--difficulty |
-d |
The difficulty of the AI player. Must be one of: 'easy', 'medium', 'hard', 'impossible' |
impossible |
--player |
-p |
Which player to control (1 = red, 2 = yellow) | 1 |
Example Usage
This example loads the game against a medium difficulty opponent, playing as yellow:
connect-four -d medium -p 2
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for connect-four-ai-demo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| connect_four_ai_demo-0.1.0.tar.gz | 181.3 kB | Without provenance | Details for connect_four_ai_demo-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| connect_four_ai_demo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for connect_four_ai_demo-0.1.0-py3-none-any.whl |
Total release size: 361.5 kB
Release files / connect_four_ai_demo-0.1.0.tar.gz
| Download URL | connect_four_ai_demo-0.1.0.tar.gz |
|---|---|
| Size | 181.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c667fb3c15a06c01fc6560721e7364ec013f3542705204a6e15cd0177cff144
|
|
BLAKE2b-256 checksum How to use checksums |
f2b4aded1aa7b78af3c3343473f99408ec0085c18a02d1968a9179d09013c32e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.19
|
Release files / connect_four_ai_demo-0.1.0-py3-none-any.whl
| Download URL | connect_four_ai_demo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 180.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d27a99ec8e9590ddfb80fd477131d85ba579641917d7e8637c938092024c122c
|
|
BLAKE2b-256 checksum How to use checksums |
fb779a1a46383171dfee7abaf4e931f968ca01186a760aa14ef83ac59d3ff321
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.19
|
Security for connect-four-ai-demo 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.