New version 0.7 available here - add a comment if it cannot be downloaded.
See this article to know how to install it. Practically, just unzip and type in a command prompt: java -jar bloodbowl-0.7.jar. Should be easy 😀 !Java 20 is needed!
If you want to use 'Bot Bowl' interface, see this blog article, but in Bot Bowl, this AI is slightly less good and some skills are not implemented or properly tested.
To summarize:
The two main points of this release are:
- Focus on the AI;
- Add new teams (14) from the Secret League (https://fumbbl.com/help:SecretLeague)
Although the AI has been improved, it remains a lots of possible improvements and you will still see some stupid moves. However I have added a lots of tests and developed some debug tools that allow me to easily introduce new tests. Practically, this means we should get less regressions in the AI in the future. I mean, when adding a new AI behavior, you do not always realized that this new behavior introduces a weakness in a different position. With all the tests added in this release, we should have less regression in the future!
The UI for the tournament creation is still ugly - maybe one day it will be improved 💪
Last remark: the AI is a bit slower - an AI vs AI match takes now about 11 seconds without UI activated. This is far too long, but this is not really a problem.
Enjoy!
Final change log:
Version 0.7
===========
Requires now Java 20.
Rules Implementation
--------------------------
- It is now possible to re-roll a 'Ball and Chain' move;
Bug correction
------------------
- Game could freeze with skill 'Ball and Chain';
- Correct regression with skill 'Ball and Chain' where player stopped to move after one block;
- Correction where it was possible for player with 'Leap' to use the skill during 'Quick Snap';
- In some cases, it was possible to use 'Leap' with only one remaining 'Going For It';
- Correct an issue in UI if you use Ctrl + right click to move a player (it was a hidden functionality not working correctly). This has been disabled;
- It was not possible to start a drive if the remaining number of players was lower than 3;
AI improvements
---------------------
- Correction in blocking probability when attacker has skill 'Wrestle' or 'Pro';
- Minor improvements related to dice selection (or reroll choice) when blocking a player that can be pushed out of the pitch;
- When the bank is full (200 000 Gold), now AI uses remaining gold in treasury to buy inducements before each match;
- AI will block/blitz more frequently;
- Small change where blitz was never used if the player was already next the opposite player (this has an impact for 'Horns' for example);
- Blitz is now more often used by 'prone' player;
- Minor change of behavior when the ball is in the air;
- Improvements in the choice of the AI to select the player to assist, and the square to go;
- Improvements when moving the catcher;
- Correct regression where AI was not anymore trying to bother catcher that could potentially score a Touchdown;
- Better take into account skills 'Side Step' and 'Stand Firm' to be less 'afraid' of squares next border;
- Minor changes in selection of square when pushing an opposite player;
- Better move done by prone players;
- Better move to defend ball carrier;
- Correct regression related to skill 'Throw TeamMate' - it was almost never used;
- Do not try to improve assist of an attacker who has 'Chainsaw' skill - because it will not change the probability;
- AI wanted to always move the ball carrier of at least one square before to hand-off the ball. Now it can directly hand-off without moving it is the best action;
- Better move chosen by the ball carrier;
- Hypnotize first players that have a tackling zone;
- Improve choice to follow or not after a push;
UI improvements
---------------------
- It is not possible anymore to click on 'Cancel' when upgrading a player (previously we could re-roll dices until we like the result);
- Some text could be badly displayed depending on the Java version used - like the Team's name on the pitch;
- Do not show inducements dialog before match if not enough money to buy the cheapest one;
- Team Ranking: column 'Points' moved to the last column;
- When the user click on a square, if he doesn't release the button on the same square -> no action is executed. This avoids some potential bugs;
Miscellaneous
-----------------
- Add some 'Secret League Team' from https://fumbbl.com/help:SecretLeague:
New version 0.6 available here- add comment if cannot be downloaded.
See this article to know how to install it. Practically, just unzip and type in a command prompt: java -jar bloodbowl-0.6.jar. Should be easy 😀
If you want to use 'Bot Bowl' interface, see this blog article, but in Bot Bowl, this AI is slightly less good and some skills are not implemented or properly tested.
To summarize:
Very very few changes compared to 0.5. This release is done mainly for BotBowl competition. It was mandatory to correct a crash in version 0.5.
In 0.5 there was also a very annoying rare crash that freezes the game - hard to reproduce. Maybe the bug is corrected. If not, new debug information should help to find the issue.
Final change log:
Version 0.6
This version is very similar to 0.5 but is released to participate to BotBowl V.
Bug correction
- In previous version, there is a very blocking bug where UI can freeze. This version contains small modifications to try to solve it and to add debug information if the bug still occurs;
- A re-roll done during a block always counted for 2 re-roll;
- Sometimes after a match, clicking on 'End Turn' to exit the game was not working. This was blocking the game;
AI improvements - specific to 'Bot Bowl'
- There was a regression in the previous version (0.5) that leads to a crash when AI has to select a square to push;
New version 0.5 available here- add comment if cannot be downloaded.
See this article to know how to install it. Practically, just unzip and type in a command prompt: java -jar bloodbowl-0.5.jar. Should be easy 😀
If you want to use 'Bot Bowl' interface, see this blog article, but in Bot Bowl, this AI is slightly less good and some skills are not implemented or properly tested.
To summarize:
Some cool stuffs like implementation of latest skill of LRB6 (all skills are implemented now!), blood on the pitch, different pitches, inducements before match can be used also for user team (Wizard and so on), small animations (when gaining XP, etc)... But main task was bug fixing for this release - like turn marker that was moved at the end of the turn and not at the beginning.
This version should be more stable than v.0.4, although I know it contains some bugs I still do not have resolved. But to my knowledge, no big issue... UI to create/manage tournament is still poor, but my time is limited! 😛
Final change log:
Version 0.5
Still requires Java 11.
Rules Implementation
- 'Juggernaut' skill: during blitz action when 'both down' is selected, we can now use the skill to select 'pushed' instead;
- Add skill 'Leap';
Bug correction
- Player that should miss one game was missing 2 games (and in second game, it was counted as a member of the team -> we could start with less than 11 players)
- It was not possible to reroll a failed 'Wild Animal' roll;
- During pushing sequence (after block), ball sometimes bounces before the end of the sequence. Now this is done only after all pushing moves;
- It is no longer possible to use team reroll when catching ball at kick-off;
- Player with skill 'Decay' could keep status 'Badly Hurt' during several matches, leading to some issues;
- Injured Star Player was not always removed from SI area after a game;
- If ball was caught by a player in Touchdown area, touchdown was not counted;
- A player was able to use skill 'Sure Feet' more than once per turn;
- Rare crash when a player with 'DumpOff' has the ball and is blocked by a player with 'Multiple Block';
- During 'Touchback' at kick-off, AI was able to select only player not in tackle area to get the ball. If none available, ball was not anymore on the pitch;
- Turn marker move is now done at the beginning of the turn after kick-off (and not at the end);
- Skill 'Tackle' for stand up player was effective even if the player had lost his tackle zone (being hypnotized for example);
- 'Dauntless' skill was used also for defender although it should be only for the player who blocks (attacker);
- When AI was buying a Wandering Apothecary (inducement), an Igor was bought instead;
- Frenzy skill was not used for 'Pushed' result on a defender who is using 'Stand Firm' skill;
- It was possible to move (during block action) a player with 'taken root' activated;
- The attacker player was earning Star Player point if the defender was stunned and also if the defender was thrown out of pitch;
AI improvements
- Better use of 'Juggernaut' skill;
- Miscellaneous improvements of Vampire team - mainly when 'Blood Lust' failed;
- Corrections in path finding algorithm - in some cases some squares were not correctly evaluated;
- Skill 'Leap' is taken into account in each move probability;
- Minor Skill selection changes when upgrading a player;
- Minor changes in Team management after game;
- Minor changes in behavior during a game;
AI improvements - specific to 'Bot Bowl'
- Now AI never uses 'Apothecary' when player is simply KNOCKED_OUT (apothecary is kept for later);
UI improvements
- Ensure we cannot move player in bad area during set-up;
- When creating new tournament and loading existing teams, now 'Human' coach is correctly retrieved (previously it was always AI selected);
- Now we can load teams coming from 2 different saved tournament if they have the same name - when creating the team, we generate a unique id. This will not work for tournament saved before v.0.5. We can also rename a loaded team (useful when 2 teams of different saved tournament have same name);
- Add possibility to change pitch background;
- In Team editor, Team Value was not directly updated when a player was upgraded;
- In Team editor, some values (like Reroll, treasury, etc) were sometimes incorrect, mainly after switching from one team to another one;
- Information dialog is now displayed to give more information about kick off event;
- Indicate Team Name on each side of the pitch;
- Add blood on the pitch when a player is KO, Badly Hurt, Seriously Injured or Dead;
- Add simple animation when a player gains experience or/and score touchdown;
- Reduce CPU used by UI when a player is selected;
- Correct display of dice roll for 'Shadowing' in the Information window (one modifier due to Movement value was not correct);
- Inducements can now be bought by user in the pre-match sequence (consequently Wizard can be now used by the user);
- It is no longer possible to create, load save a tournament when a game is running;
- Small improvement of UI when creating new tournament - now you can easily delete some teams loaded from previous tournament;
- Background picture added when creating new tournament;
Yeahhhhh! Last skill that was not yet implemented, 'Leap' has been developed! In the list of actions available, there is now the 'Leap' button:
This is not an 'action' like Pass or Blitz, but it was convenient to put the button there.
The button is available only if a player with skill 'Leap' is selected, if he has not yet used it this turn and if it remains at least 2 moves. Then you see the possible leap location (in magenta):
A right click on the square and the leap is done (at the cost of 2 moves)!
Another way to use the skill (the simplest one!) is just to let the path finding algorithm find when leap is needed. Example:
If your mouse is on the square '67' (67 is in reality the probability to reach this square, and yes print screen is removing the mouse icon 👎), you see as usual the yellow path and in magenta the leap destination. So the 'Slann' player will move two squares, then leap then move again if leap was successful! Notice algorithm doesn't suggest to do 2 dodges instead of the leap, because the probability of success is lower. If probability of dodge is equal to the probability of leap, then dodge is selected - because it's interesting to keep the leap for later!
Examples:
If selected player wants to go one square right, leap is suggested (to avoid to dodge in a square where 2 opposites players have a tackle area)
However, on the upper square, it is better to dodge (square is yellow = classical move and here with dodge)!
In this last example, dodge is done although leap has the same probability (because player has skill 'Very Long Legs'). But if user really wants to leap, he still can do it - by pressing the 'Leap' button.
And what about the AI? This is cool: as the path finding algorithm is already used by the AI for each move, nothing has to be done! For every action AI will take 'Leap' possibility into account: for moving, for moving then pass, for moving then foul, for blitz and so on!
This implementation and many other fixes will be available in v0.5. - coming soo... euh no, not any idea of when it will be available, I still have some tasks to finish 💀!
Bot Bowl IV is the fourth AI competition in Blood Bowl and happened (virtually) at the IEEE Conference of Games 2022 - see this link for more information.
Don't have yet time to look in details at the results. And let's be honest, number of playing games during the competition is wayyyyy to low to be significant enough to see which AI/Bot is the better, but anyway the win for this year is for Drefsante_AI!
Only 'Human' team versus 'Human' team games. A competition with all teams would be better for my AI as it's taking all skills into account which is probably not the case of other bots. Except 'Leap' which has been implemented only in v.0.5 - article about this will come soon.
Thanks to Niels Justesen for the tournament and to all those that have implemented the 'Bot Bowl' interface which is quite nice.
Last available version of Dresante_AI is still the v.0.4 - see this article.
New version 0.4 available here - add comment if cannot be downloaded.
See this article to know how to install it. Practically, just unzip and type in a command prompt: java -jar bloodbowl-0.4.jar. Should be easy 😀
! Only bloodbowl-0.4.jar file is needed, all other files are used only for 'Bot Bowl' interface - see below.
To summarize: to be honest, I didn't work a lot on this project this year, and most of differences with 0.3 have been implemented end of last year and are mainly bug corrections. Notice that Skill'Throw Team-Mate' (and all related skills) has been implemented (see details). Skill 'Bombardier' is also implemented - but AI will not yet used it. But if you throw bomb on an AI he will perfectly deal it. See this video:
Rules are still LRB6 rules, and only missing skill is 'Leap'!
Version contains also some fine UI improvements - like lots of tool tips about rules have been added.
And last minute dev (which means with lots of bugs and badly tested 😋), when creating a new tournament you can now load some (or all) teams of a previous tournament:
- Select old tournament you have saved;
- Click on Load Teams. This will add new teams and you can remove some of them, and eventually change coach (from AI to Human for example):
To those teams, you can still add new random team(s) or team of your choice. This will allow you to create different leagues, divisions, promoting teams to higher division, etc! Just save each tournament with meaningful name.
'Bot Bowl' AI is also available
A python interface has been developed to be able to use Drefsante_AI in Bot Bowl: see this project to know more about 'Bot Bowl'.
You simply need bloodbowl-0.4.jar and the python files drefsante_bot.py and drefsante_bot.cfg.
JAVA jdk-11 must be installed on the machine and system PATH must contain full path to:
- [...]/jdk/bin
- [...]/jdk/bin/server
Configuration file 'drefsante_bot.cfg' must be edited with parameters:
temporaryFolder = path to an existing folder where files can be created/deleted
jarPathName = path to the .jar file
See njustesen project to know how to use a bot. Practically you will have to import drefsante_bot, and name of the bot is 'Drefsante_AI_v.0.4'.
This version will participate to the Bot Bowl IV competition! Notice this version is much slower and all skills are not yet working.
Print screen of 'drefsante_ai' about to score against 'scripted' version of Bot Bowl - although team has been seriously injured!
Final change log:
Version 0.4
Still requires Java 11.
Rules Implementation
- Add skill 'Throw Team-Mate';
- Add skill 'Right Stuff';
- Add skill 'Always Hungry';
- Add skill 'Bombardier';
Bug correction
- Correct bug at kick-off where it was possible to give ball to a player with No-Hands skill if ball went out of pitch;
- Correct bad implementation of 'Really Stupid' skill;
- Correct bug for 'PassBlock' when used by AI;
- Bug where AI can have more than 16 players and didn't fire any player;
- Can happen that after failed blood lust, it is not asked to select a victim to bite - for example after block against player with 'Foul Appearance' skill;
- Was not possible to use 'Bribe' coming from 'Get the Ref' kick-off table;
- Bug when more than 16 players in one team (due to Necromancer who uses 'Raise the Dead');
- One bounce was missing when launching ball on an empty square (if pass was accurate);
- If a player was 'stunned' and suffered a 'knock-down' result (foul action for example), 'stunned' status was lost;
- Correct a bad error message if a collapsed player was set on pitch at kick-off;
- We can now use several bribes (if we have several) successively if first attempt(s) is (are) failing;
- 'Follow' Move is now done before setting defender knock down;
- When an injury was removed (apothecary or regeneration), player was still missing next match;
- Correct rare crash when ball&chain player on the pitch;
- Was not possible to rise up player with root activated;
- Take root roll could be done although player had root activated;
- Injured player with 'Secret Weapon' was not missing next game and injury was never removed;
- For Injury roll > 51, there were some errors in the injury obtained;
- Regeneration after Decay was not always healing both injuries;
- It was possible to use Igor on 'Star player';
- Players of the receiving team that were stunned during kickoff event (pitch invasion, blitz, etc) were not switched to prone with move done
(so these players were missing 2 turns instead of one);
- Now if a player wants to stand up with MA lower than 3, a roll of 4 is needed;
- During Blizzard it was possible to do pass longer than SHORT;
AI improvements
- AI can use all new skills implemented in the version, except 'Bombardier' he will not yet used. But if he receives a bomb, he will throw it;
- Minor changes in skill selection;
- Improvements in move of player that will assist a block/blitz;
- Add new possible starting roster for 'Chaos', 'Chaos Dwarf', 'Elf', 'Goblin', 'Halfling', 'High Elf', 'Human', 'Khemri', 'Lizardman', 'Necromantic', 'Norse', 'Nurgle', 'Ogre', 'Orc', 'Skaven', 'Undead', 'Vampire', 'Wood Elf';
- Ball carrier was sometimes going back too fast if he cannot score before end of game (not good because it makes pass/hand-off in order to score more difficult);
- AI was still sometimes moving on a ball when not explicitly wished;
- Correct big error in probability to move where number of tackles at destination was not taken into account;
UI improvements
- Some checks are done before to create new tournament (like no team with same name, etc);
- Nothing was visible in the interface if a player uses 'DivingTackle';
- Apothecary icon is now not visible if he has been used during game;
- New information is available for each team (Team Value, FAME, inducements, etc.);
- Team logo is visible only if team can re-roll this turn;
- Add lots of tool tips (notably for skills);
- In player information window, skill is strikethrough if skill cannot be used anymore for the player;
- Status 'Collapsed From Heat' is now visible in the player information panel;
- Ball&chain: after first move, blue block dices were not visible;
- Icon visible when a player is victim of 'Foul Action';
- 'Move' value of a player with 'root' activated is now equal to 0 (so we see ;
- When creating new tournament, it is now possible to load teams from previous saved tournaments;
- Correct some problems when renaming a team;
- Pass issue: problem of display of players that can intercept;
In v.0.4, Skill 'Throw Team-Mate' (and 'Right Stuff' and 'Always Hungry') has been implemented.
User Interface Implementation
This section explains how user can use the skill - for other existing rules see first release article.
1) Select (left click) the player with 'Throw Team-Mate' and click on the 'Pass' button
As usual, safe moving squares are displayed in green and risky in red.
2) Then move player next a player with 'Right Stuff' skill (right click on square to move).
Eligible players to be thrown are highlighted in blue - you still can move if you do not want to throw one of these players.
3) Select player to throw (left click).
Then you see all squares where players can be thrown:
4) Select square to throw (right click) and hope for the best! 🙏
Which is unlikely to happen 😁
AI Implementation
AI will use the skill for 2 different reasons:
- avoid opposite player to score - defensive use;
- try to score - offensive use.
Defensive use
Context: next team is about to score. No wizard remains, and there is no available player to blitz the ball carrier. Only way to stop ball carrier is to throw team-mate! Best would be to fall on him, but if thrown player can be moved to simply force a block/blitz or dodge, it's better than nothing!
How the AI uses skill in this case?
- It checks if opposite player can score in one turn without 'going for it';
- If yes different probabilities are calculated:
1) For each possible thrower (player with 'Throw Team-Mate), it checks if he can throw a 'right stuff' player next him on the ball carrier. If yes, we record the probability of success - PthrowPlayer.
We take into account:
- probability to activate player - PActivation (for 'Bone-Head' skill for example);
- probability to success 'Always Hungry' Roll (if relevant) - PAlwayshungry;
- probability to not fumble player - PFumble (tackle zones are taken into account);
Here we do not take into account probability of success landing - but it will be done in Offensive Use section. So probability to throw player is (for each pair Thrower/thrown player):
PThrow = PActivation * PAlwaysHungry * PFumble
2) Same calculation but taking into account that 'thrower' can move before to throw team-mate - all possible move probabilities are already known/calculated by the AI. We check all neighbor squares of thrower as it can impact probability (probability to move there and probability to throw player) due to possible tackling zones;
P = PMoveThrower * PThrow
Best probability between 1) and 2) is selected - to be precise, best probability of all the possible combinations.
Notice that between 2 equal probabilities, the priority is to throw a player that has not yet moved: if landing is successful he will be able to bother ball carrier.
3) If previous points are not possible (because 'right stuff' player is too far from ball carrier), same calculation is done but taking into account that 'right stuff' player will first move - to enter into a square where he can be thrown on ball carrier. Final probability is then:
P = PMoveThrown * PMoveThrower * PThrow
The thrown player will not be able to move after landing, so chances of success are low 😋
In the context of a League/Tournament, AI should not use this skill for defensive skill. Because potential gain (avoiding to receive a touchdown) probability is too low in comparison of probably to get a player injuried/dead!
Nevertheless because it's funny when it works, AI will use the skill for defensive skill 😁
Offensive use
This is the most useful use of the skill, but let's be honest: it rarely changes the result of a game!
Actually, before each movement, AI calculates probability to score when he has the ball. It can be done:
- with a simple move;
- with a hand-off move then a move;
- with a pass move then a move;
- with a hand-off move then a pass move then a move;
- with a pass move then a hand-off move then a move;
All these probabilities were already calculated before this implementation. They take into account all possible player skills (dodge, pass, tackle, sure feet, sprint, hail mary pass, etc), and all possible combinations to keep at the end the highest one.
With this throw Team-mate skill, new probabilities have to be assessed:
- throw ball carrier (if he has not yet moved) then move ball carrier;
- move thrower then throw ball carrier player then move ball carrier;
- hand-off the ball to a player then throw him (with, again, eventually a move of the thrower), then move ball carrier;
Probability to throw a ball carrier that has already moved is not calculated - this has really too low change of success.
Practically, the attempt to score a touch down is done only if value is higher than a fixed value, or if it's the last turn of the half. From a probability point of view, we can see that throw team-mate will be used only if there is no other solution...
To score a touch down, this time it is necessary to assess probability to land and then probably to reach the TD, which is not guaranteed with the 3 'bounces'!
Probability to land 'on feet' (PLand) is not very precise as we are not sure of how many tackle zones we will have - well we can calculate the exact probability, but this is not needed and it has not been calculated.
What is important is to know if it will land (after bounces) 3 squares closer to the touch down, 2, 1, at same row as destination chosen by thrower, 1 square further, 2 or 3. It's important because player can land to a square where he's too far to touch down. Also to know if he will need to use 1, 2 or eventually 3 'going for it'. This probability to reach TD can be calculated as followed:
- P3 is the probability that the ball bounces at the end on a square (pitch column) which is 3 squares closest to TD that initial destination;
- PmoveToTd+3 is the probability that if a player starts at this column, he will reach the TD. This takes into account player move value and number of 'going for it' needed (and skills like 'Sprint', 'Sure Feet', etc.), but we do suppose we will have no dodge. It's too complicated to assess the right probability, and this is not necessary. Notice this probability can be null.
- etc for other P;
Notice for 'Offensive Use' destination chosen is always far enough of the border - thrown player will never goes out of pitch. At equal probability, AI chooses also a destination where number of opposite players is low.
In the most complex case where player hand-off the ball to a player that will be thrown (with also a move of the thrower!), the probability to score is then:
Notice also that setup is modified for receiving Team if it's the last turn and if there are players to use the skill. If ball goes out of the pitch and must be given to a player, it will also be given to the 'good' player - player with 'Right Stuff' next a player with 'Throw Team-Mate'. This is visible in Part 3 of the video - ball has bounced out of pitch and ball has been given to the right player.