Commit Graph

432 Commits

Author SHA1 Message Date
1brucben 8aa6d232c3 potential sam fix 2025-04-26 04:00:23 +02:00
1brucben 18c74baf78 potential mirv sam fix 2025-04-26 03:58:33 +02:00
1brucben 5de9da3241 adjust target ratios for ports and cities in FakeHumanExecution 2025-04-26 03:08:58 +02:00
1brucben 7c7ad1281c evan's tile algorithm 2025-04-25 23:57:56 +02:00
1brucben 63f5a7858e defense posts builds by bots require 1 city 2025-04-25 23:31:21 +02:00
1brucben 41ec783aa4 Merge branch 'main' into meta3AI. remove underline at 90. 2025-04-25 21:33:51 +02:00
1brucben ced75a635a adjusted attack formula further. reenabled fallout nerf. 2025-04-25 21:18:53 +02:00
evan 4899c3383f remove transport ship embark delay 2025-04-24 12:45:47 -07:00
1brucben 58b8a94b2e Adjust city gold production and fix defense post bug 2025-04-24 13:09:57 +02:00
1brucben a26ffb3cb3 Adjust defense post target ratio for improved gameplay balance 2025-04-24 06:00:09 +02:00
1brucben 34443591be Adjust defense post parameters and starting manpower for improved gameplay balance 2025-04-24 05:57:41 +02:00
David Eskin 304cbb6e8f restore alliance trade safety 2025-04-23 23:09:03 -04:00
David Eskin 7119923e09 Restore DefensePost shells, increase cool down, decrease shell damage 2025-04-23 22:57:59 -04:00
1brucben 2f59c50f64 disable shooting in DefensePostExecution and reset embarkDelay to 0 in TransportShipExecution 2025-04-24 04:07:42 +02:00
1brucben 11bd204bd0 fix nuke bug, boost attack speed for large attacks 2025-04-24 03:56:58 +02:00
1brucben e6acbd0702 Merge remote-tracking branch 'origin' into meta3AI 2025-04-24 02:27:20 +02:00
1brucben 5b60fc8498 ai builds defense posts. 2025-04-24 02:26:19 +02:00
evan 1f890396ab update ShellExecution to use AirPathFinder 2025-04-23 17:22:37 -07:00
1brucben 67cf20cd65 meta3 with AI 2025-04-23 23:46:01 +02:00
1brucben c39e9fff37 allow targeting of all non-ally warships 2025-04-23 22:24:43 +02:00
1brucben 31ba96e765 Merge branch 'main' of https://github.com/openfrontio/OpenFrontIO into meta3 2025-04-23 22:10:41 +02:00
evan b13029591d bugfix: Path.Mini was modified to only pathfinding on water, which broke nukes. Created AirPathfinder class to handle pathfinding for nukes 2025-04-23 13:04:33 -07:00
1brucben 4e94b5b37b further calibration to nukes and population 2025-04-23 21:05:04 +02:00
1brucben 245986e15d Merge remote-tracking branch 'origin' into meta3 2025-04-23 19:56:15 +02:00
evanpelle 84287b8dfa Multi src astar (#594)
## Description:
Samples border shore tiles and uses multi-a* for determining the
transport ship spawn cell.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

<DISCORD USERNAME>
evan

---------

Co-authored-by: evan <openfrontio@gmail.com>
2025-04-23 10:16:43 -07:00
Scott Anderson 228539ba78 Merge main into nations-ai 2025-04-23 03:04:49 -04:00
1brucben b42384c3a8 Merge branch 'main' into meta3 2025-04-22 16:52:55 +02:00
evanpelle 71849b47cd better transport ship spawn (#587)
## Description:

Taken from PR #506

Improve transport source tile by considering border extremums

Only calculate better spawn tile for humans, and have the sender
calculate it and send the src tile in the intent for better performance.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

<DISCORD USERNAME>
evan

Co-authored-by: evan <openfrontio@gmail.com>
2025-04-21 19:49:17 -07:00
1brucben 8134f435a2 Commit all at once 2025-04-21 20:14:46 +02:00
APuddle210 f713254081 Address-River-Criticisms (#536)
## Description:

Please see description on: #535 

fixes #535 

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

aPuddle

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-18 18:05:27 -07:00
Evan 9de072c0c6 fix failing SAM test 2025-04-18 14:26:19 -07:00
Evan 38b1845ed1 don't allow structures to spawn too close to each other. When choosing a spawn, canBuild() finds a suitable nearby tile if chosen tile is too close to an existing structure. 2025-04-18 11:51:54 -07:00
Scott Anderson ae30c88b03 Merge main into nations-ai 2025-04-18 02:09:56 -04:00
Brandon Yi 0995b0a5e3 Increase SAM search radius and cap cost at 3mil (#529)
Fixes https://github.com/openfrontio/OpenFrontIO/issues/515

## Description:

Bumping SAM launcher search range from 75 to 100. Also, decreasing the
max cost of the SAM to 3 mil (down from 4.5mil)

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [X] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [X] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

bypie5

---------

Co-authored-by: APuddle210 <david.eskin@gmail.com>
2025-04-17 19:38:37 -07:00
Scott Anderson 1b672420b3 Combine Bot and Nation behaviors in to a shared class (#434)
This is the first move in the effort to combine the redundant logic that
exists between BotExecution and FakeHumonExecution.

This commit:
1. Combines the alliance request handler, moving bots to use the same
logic as nations for acceptance.
2. Combines the sendAttack() functions, which may later be reworked.
3. Introduces selectEnemy() function to wrap enemy selection logic that
nations use.
4. Blocks nations from nuking bots.
5. Alters enemy selection to prefer neighboring bots if there are any.

## Description:

Fixes #467 

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

fake.neo

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-17 19:37:16 -07:00
Scott Anderson ccadd7f6a8 Nations target structures with nukes (#393)
## Description:

Nations will prefer to target their nukes at structures. This updates
the existing logic, which attempts ten times to randomly select a
coordinate 15 tiles inside the border, to instead generate a list of ten
random tiles in addition to a list of all of the tiles of relevant
structures. The two lists are concatenated to create a set of tile
candidates. These candidates are scored, and the tile with the highest
score, if one is found, is nuked.

The scoring function considers three factors:
1. Damage potential: values of structures with 25 tiles of the target
tile.
2. Distance from silo to target (hang time).
3. Recently nuked locations.


![image](https://github.com/user-attachments/assets/10c7bd96-ad51-404c-84c9-c0840dc8250c)

Fixes #471 

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

fake.neo

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-17 19:22:35 -07:00
Ilan Schemoul 8925f48ba7 sam protects againt mirv warhead (#376)
Fixes #483 

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
![Capture d'écran 2025-03-30
174759](https://github.com/user-attachments/assets/8245723d-68de-4b96-ab19-5d85be18e4d9)


## Please put your Discord username so you can be contacted if a bug or
regression is found:
respectful pinguin
2025-04-17 19:02:50 -07:00
Scott Anderson 6af9e32157 Merge main into nations-ai 2025-04-16 01:06:00 -04:00
Evan da580eaebd sam has 100% chance to hit atom bomb 2025-04-10 14:28:51 -07:00
Evan c7356a7348 have Team be an enum instead of an object, this was causing equality problems. 2025-04-05 21:39:12 -07:00
Evan 0dbc246a63 reduce transport frequency for fakehumanexecution, make transport render more efficient 2025-04-05 17:14:56 -07:00
Evan 5fec649b9c perf: PortExecution only check to spawn trade ships every 10 ticks. 2025-04-05 11:15:15 -07:00
Evan 53a30899c6 only check break allainces on detonation, not everyt tick 2025-04-05 10:55:39 -07:00
Scott Anderson 729920bdca Avoid sqrt for euclideanDist function (#395)
## Description:

In most cases we do not need to solve for the hypotenuse length and can
do math directly on the square of the hypotenuse. For example, the
common use case for calculating euclidean distance is to check if two
points are within a certain distance of each other. In this case,
`Math.sqrt(x*x + y*y) < d` can be rewritten as `x*x + y*y < d*d`.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

fake.neo

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-05 10:17:29 -07:00
Evan 21752aa214 add perf improvements: don't draw full boat tail, make nukes calculations slightly more efficient 2025-04-05 10:10:15 -07:00
Scott Anderson 01ac56e62a Merge main into nations-ai 2025-04-04 20:41:22 -04:00
Scott Anderson 11d7eaee99 wip 2025-04-04 20:40:36 -04:00
Evan 2cb8c239cf make sendBoat() more efficient: find random tiles instead of doing a breadth first search 2025-04-04 16:04:57 -07:00
Evan 190a67b72a delete tradeship if path not found 2025-04-04 12:11:10 -07:00
Evan 924ca2c69e bugfix: humans start with zero troops on teams, also removed manpower argument to addPlayer() 2025-04-04 10:03:00 -07:00