Skip to content

Commit d4fcb9e

Browse files
Removed venv, updated copilot instructions, added double-lock to wallcrash
1 parent 793d277 commit d4fcb9e

File tree

12 files changed

+359
-142
lines changed

12 files changed

+359
-142
lines changed

.github/copilot-instructions.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,37 @@ Purpose: Help AI coding agents work productively in this repo of desktop automat
77
- Screen + input automation:
88
- `arrastools.py` — hotkey-driven macros using pynput. Listeners run at module end and spawn daemon threads via `start_*` helpers.
99
- `arrastools2.py` — alternative version with similar functionality and cross-platform support.
10+
- `arrastools_nomacropanel.py` — streamlined version of arrastools without the macro panel GUI, same hotkey functionality.
1011
- `arrasbot.py` — a watchdog that samples screen pixels with `mss`, reacts to state (disconnected/died/banned), and logs/screenshots.
1112
- `arrascopypasta.py` — copypasta automation with platform-agnostic file path handling using pathlib.
12-
- PPO AI prototype:
13+
- `arrascopypastareload.py` — enhanced copypasta with auto-reload functionality and pixel detection for UI state.
14+
- PPO AI prototypes:
1315
- `arrasai.py` — defines PPO agent (PolicyNetwork, PPOMemory, ArrasAI) and training/exec loops over screen observations sampled in a polygon (`GAME_REGION`). Models saved to `arras_models/` (e.g., `arras_model.pt_best`).
14-
- Assets/data: `arras_models/`, `logs/`, `copypastas/`.
16+
- `asnake.py` — DQN-based Snake game AI with configurable training via `snake_config.json`. Models saved to `snake_models/`. Optional pygame visualization (headless mode if pygame unavailable).
17+
- Utilities and helpers:
18+
- `arraspixel.py` — click-to-inspect pixel color tool using mss and pynput mouse listener.
19+
- `arrasmouselocator.py` — records mouse click positions for coordinate mapping.
20+
- `arrasmouse.py` — simple mouse position setter utility.
21+
- `keylogger.py` — keypress logger with timestamped output to `logsk/` directory. Press Esc to stop.
22+
- Game-specific macros:
23+
- `arrasantiafk.py` — simple anti-AFK mouse wiggle with periodic clicks.
24+
- `arrashealmacro.py` — auto-spam 'h' key for 15s when h is pressed (healer macro).
25+
- `arrastank.py` — tank upgrade/control automation sequence.
26+
- `arrasstack.py` — stack macro with circular mouse movement at configurable angles/radius.
27+
- `arrasdev.py` — multi-threaded ball crash stress test (spawns 32 threads for mass ball spawning).
28+
- `arrasreload.py` — automated UI reload with chat message automation.
29+
- `arrastext.py` / `arrastext2.py` — in-game text drawing using ball placement with bitmap font support.
30+
- `arrasshaver.py` — utility for processing bitmap font character templates.
31+
- `arrasbp.py` — blueprint/character pair processing utility.
32+
- External tools:
33+
- `screensender.py` — WebSocket screen streaming server with remote mouse/keyboard input support.
34+
- `minesweeper.py` — terminal-based Minesweeper game with ANSI color display.
35+
- `cobalt.py` — automated video downloader using cobalt.tools with pixel-based UI detection.
36+
- `sumo.py` — pixel-based directional movement automation (detects red pixels for WASD input).
37+
- `drawacircle.py` — click two points to define a rectangle, finds white center, draws a circle with mouse drag.
38+
- Test/development scripts:
39+
- `linuxtest.py`, `arrastest2.py`, `arashealertest.py` — minimal pynput test scripts for platform verification.
40+
- Assets/data: `arras_models/`, `snake_models/`, `logs/`, `logsk/`, `copypastas/`, `bps/`, `bitmap.txt`.
1541

1642
## Cross-platform support and runtime assumptions
1743

@@ -62,6 +88,8 @@ All main scripts now include platform detection using `platform.system().lower()
6288
- **Core libraries**: `pynput`, `mss`, `numpy`, `pathlib` (built-in)
6389
- **Bot utilities**: `ping3`, `Pillow`, `mss.tools`
6490
- **AI/ML**: `torch`, `shapely`, `pytesseract`, `Pillow`
91+
- **Snake AI**: `torch`, `numpy`, `pygame` (optional for visualization)
92+
- **Screen streaming**: `websockets`, `Pillow`, `mss`
6593

6694
### System dependencies (platform-specific)
6795
- **macOS**: Tesseract via Homebrew: `brew install tesseract`
@@ -78,7 +106,7 @@ source .venv/bin/activate # Linux/macOS
78106
.venv\Scripts\activate # Windows
79107

80108
# Install dependencies
81-
pip install pynput mss numpy ping3 pillow torch shapely pytesseract
109+
pip install pynput mss numpy ping3 pillow torch shapely pytesseract websockets pygame
82110

83111
# Platform-specific system packages
84112
# macOS: brew install tesseract
@@ -101,6 +129,14 @@ pip install pynput mss numpy ping3 pillow torch shapely pytesseract
101129
- Samples RGB at `OBSERVATION_POINTS = sample_points_in_polygon(GAME_REGION, step=10)` using `mss`; outputs: action (W/A/S/D/Space), mouse target, Sum42 head, and upgrade path.
102130
- Models saved in `arras_models/` with suffixes `_best`, `_final`, `_interrupted` based on training flow.
103131
- `arrascopypasta.py`: Reads `.txt` files from `copypastas/` directory (uses pathlib for cross-platform compatibility).
132+
- `asnake.py` Snake AI training:
133+
- Config: `snake_config.json` controls grid size, training episodes, rewards, display settings, parallel games.
134+
- Hotkeys: `Esc` to quit, visualization via pygame (optional).
135+
- Models saved in `snake_models/` with suffixes `_best`, `_ep<N>`, `_interrupted`.
136+
- `keylogger.py`: Run to log all keypresses to `logsk/keylog_<timestamp>.txt`. Press Esc to stop.
137+
- `screensender.py`: WebSocket server for remote screen streaming. Set `SCREEN_SENDER_TOKEN` env var. Connect via `screenreciever.html`.
138+
- `drawacircle.py`: Click two points to define rectangle, then automatically draws circle at white center.
139+
- `cobalt.py`: Reads URLs from `downloadqueue.txt` and automates downloads via cobalt.tools UI.
104140

105141
## Conventions and patterns to follow
106142
- **Threading**: Use `threading.Thread(..., daemon=True)` for background actions; toggle with global flags (e.g., `slowballs`, `randomwalld`). Provide `start_*` helpers to avoid duplicate threads.
@@ -135,4 +171,4 @@ pip install pynput mss numpy ping3 pillow torch shapely pytesseract
135171
- Virtual environment recommended to isolate Python packages
136172
- Check pynput documentation for platform-specific requirements
137173

138-
References: `arrastools.py`, `arrastools2.py`, `arrasbot.py`, `arrasai.py`, `arrascopypasta.py`, `arras_models/`, `logs/`, `copypastas/`. Keep changes minimal and aligned with existing patterns.
174+
References: `arrastools.py`, `arrastools2.py`, `arrastools_nomacropanel.py`, `arrasbot.py`, `arrasai.py`, `asnake.py`, `arrascopypasta.py`, `screensender.py`, `keylogger.py`, `arras_models/`, `snake_models/`, `logs/`, `logsk/`, `copypastas/`. Keep changes minimal and aligned with existing patterns.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ __pycache__/
88
.venv/
99
venv/
1010
.env/
11+
.venv
12+
.venv314
1113

1214
# macOS
1315
.DS_Store

.venv/bin/Activate.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ deactivate -nondestructive
219219
# that there is an activated venv.
220220
$env:VIRTUAL_ENV = $VenvDir
221221

222+
$env:VIRTUAL_ENV_PROMPT = $Prompt
223+
222224
if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
223225

224226
Write-Verbose "Setting prompt to '$Prompt'"
@@ -233,7 +235,6 @@ if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
233235
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
234236
_OLD_VIRTUAL_PROMPT
235237
}
236-
$env:VIRTUAL_ENV_PROMPT = $Prompt
237238
}
238239

239240
# Clear PYTHONHOME

.venv/bin/activate

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ case "$(uname)" in
4141
CYGWIN*|MSYS*|MINGW*)
4242
# transform D:\path\to\venv to /d/path/to/venv on MSYS and MINGW
4343
# and to /cygdrive/d/path/to/venv on Cygwin
44-
VIRTUAL_ENV=$(cygpath /Users/alexoh/Documents/GitHub/arrastools/.venv)
44+
VIRTUAL_ENV=$(cygpath /Users/alexoh/Documents/GitHub/arrastools/.venv314)
4545
export VIRTUAL_ENV
4646
;;
4747
*)
4848
# use the path as-is
49-
export VIRTUAL_ENV=/Users/alexoh/Documents/GitHub/arrastools/.venv
49+
export VIRTUAL_ENV=/Users/alexoh/Documents/GitHub/arrastools/.venv314
5050
;;
5151
esac
5252

5353
_OLD_VIRTUAL_PATH="$PATH"
5454
PATH="$VIRTUAL_ENV/"bin":$PATH"
5555
export PATH
5656

57-
VIRTUAL_ENV_PROMPT='(.venv) '
57+
VIRTUAL_ENV_PROMPT=.venv314
5858
export VIRTUAL_ENV_PROMPT
5959

6060
# unset PYTHONHOME if set
@@ -67,7 +67,7 @@ fi
6767

6868
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
6969
_OLD_VIRTUAL_PS1="${PS1:-}"
70-
PS1="("'(.venv) '") ${PS1:-}"
70+
PS1="(".venv314") ${PS1:-}"
7171
export PS1
7272
fi
7373

.venv/bin/activate.csh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PA
99
# Unset irrelevant variables.
1010
deactivate nondestructive
1111

12-
setenv VIRTUAL_ENV /Users/alexoh/Documents/GitHub/arrastools/.venv
12+
setenv VIRTUAL_ENV /Users/alexoh/Documents/GitHub/arrastools/.venv314
1313

1414
set _OLD_VIRTUAL_PATH="$PATH"
1515
setenv PATH "$VIRTUAL_ENV/"bin":$PATH"
16+
setenv VIRTUAL_ENV_PROMPT .venv314
1617

1718

1819
set _OLD_VIRTUAL_PROMPT="$prompt"
1920

2021
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
21-
set prompt = '(.venv) '"$prompt"
22-
setenv VIRTUAL_ENV_PROMPT '(.venv) '
22+
set prompt = "(".venv314") $prompt:q"
2323
endif
2424

2525
alias pydoc python -m pydoc

.venv/bin/activate.fish

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ end
3333
# Unset irrelevant variables.
3434
deactivate nondestructive
3535

36-
set -gx VIRTUAL_ENV /Users/alexoh/Documents/GitHub/arrastools/.venv
36+
set -gx VIRTUAL_ENV /Users/alexoh/Documents/GitHub/arrastools/.venv314
3737

3838
set -gx _OLD_VIRTUAL_PATH $PATH
3939
set -gx PATH "$VIRTUAL_ENV/"bin $PATH
40+
set -gx VIRTUAL_ENV_PROMPT .venv314
4041

4142
# Unset PYTHONHOME if set.
4243
if set -q PYTHONHOME
@@ -56,7 +57,7 @@ if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
5657
set -l old_status $status
5758

5859
# Output the venv prompt; color taken from the blue of the Python logo.
59-
printf "%s%s%s" (set_color 4B8BBE) '(.venv) ' (set_color normal)
60+
printf "%s(%s)%s " (set_color 4B8BBE) .venv314 (set_color normal)
6061

6162
# Restore the return status of the previous command.
6263
echo "exit $old_status" | .
@@ -65,5 +66,4 @@ if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
6566
end
6667

6768
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
68-
set -gx VIRTUAL_ENV_PROMPT '(.venv) '
6969
end

.venv/bin/python

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python3.12
1+
python3.14

.venv/bin/python3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python3.12
1+
python3.14

.venv/pyvenv.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
home = /opt/homebrew/opt/python@3.12/bin
1+
home = /opt/homebrew/opt/python@3.14/bin
22
include-system-site-packages = false
3-
version = 3.12.12
4-
executable = /opt/homebrew/Cellar/python@3.12/3.12.12/Frameworks/Python.framework/Versions/3.12/bin/python3.12
5-
command = /opt/homebrew/opt/python@3.12/bin/python3.12 -m venv /Users/alexoh/Documents/GitHub/arrastools/.venv
3+
version = 3.14.0
4+
executable = /opt/homebrew/Cellar/python@3.14/3.14.0_1/Frameworks/Python.framework/Versions/3.14/bin/python3.14
5+
command = /opt/homebrew/opt/python@3.14/bin/python3.14 -m venv /Users/alexoh/Documents/GitHub/arrastools/.venv314

0 commit comments

Comments
 (0)