Saturday 7 August 2021

Blood Bowl AI - First Release

 Blood Bowl AI - First Release

Here it is, a new Blood Bowl AI implementation (using Blood Bowl Living Rulebook 6.0): BloodBowl_0_0_2.jar.

Requires Java 1.8.
Tested only on Windows.

Small tutorial

Download .jar file and type in a command prompt: java -jar bloodbowl-0.0.2.jar.
Click on File → New to create a new Tournament.

You get following options:

Number of Rounds: indicate number of times each team plays against same team.
Number of Human Teams (random): number of user team, race will be selected randomly.
Number of AI (random): number of AI teams, race selected randomly.
Create All: create the 24 available teams (controlled by AI). It is added to the other team created by the other options. Probably not a good idea to create a tournament with so many teams.
Add Team: each click on the button will add a new line where you can fully control the team creation - select if team is controlled by AI or Human, select race and team name. Ensure each team name is unique, there is no check for that.

Total number of teams in the tournament will be the sum of each option selected. Avoid to have a odd number: in this case some games with teams with not same number of played games can occur.

Click on 'Ok' to create the tournament.

As you can see interface is very simple and minimum time has been spent on it :-)


You can see the current team ranking, the schedule of the tournament, what will be the next game and results of already played games.

Team in bold are controlled by Human. Others by AI. 

Before starting any match, select your team and click on 'View Selected Team'. The Team Editor will be visible:


A roster has been selected, but while any match has not been started, you can remove each player and change your roster as you want - button 'Exit' will be unavailable if you do not have 11 players to start.
Once you're done, click on 'Exit', you're back to the ranking table. In the 'Options' menu, you have:


Animation Speed can be changed: by default it's set to 200. It's a delay in ms between two animation steps. I strongly suggest to let the default value. Put it at 0 to have the maximum speed. You can also deactivate AI Game visibility if you do not want to watch AI playing against AI. By default game is visible.

Click on 'Play Next Match' and first match will start. Just enjoy the game if it's an AI vs AI game.
If user team is in the game, you will have to play :-) 
If you close an AI vs AI game while not finished, it will resume without the UI at the maximum speed. If you close a game where you're playing, it will not be possible to resume the tournament - you will have to load your last saved file.
When user is starting a drive, by default a pre set-up is done for you, but you can still modify the positions (left click button) and click on button 'End Turn' when you're done:

If you're the kicking team - as in this example - wait AI set up and then select ball position and then click on 'End Turn'.

How to move your players?

Select the player (left click) and move the cursor:

In this example mouse is at square '69': if player wants to go there, it has 69% of chance to success. Not 100% because he has to do 2 'Going for it'. Square where probability is 100% are displayed in green (note: skills that do not produce turn over if failed like 'Bone Head', 'Take Root' etc are not taken into account here), other in red. The highlighted squares are the squares the player will follow - notice sometimes they are different paths with same probability to go to a square, if you really want to follow one path move your player square by square, mainly if you want to be sure to not pass over a square with the ball.
Right click on a square to move the player.

How to blitz?

If you move the mouse on an opposite player (here the left bottom red player), you will have:


A suggested path for the blitz is given: highlighted squares and final square where blitz occurs contains 2 numbers - probability to reach the square and probability to put the other KO (defender has neither block or dodge → 'Defender Down', 'Defender Stumbles' and 'Both Down' faces make him bite the dust, which is one chance over two). One small blue square means we will throw one dice if blitz is done from this square. Two blue: we will throw two dices and select the result. Two red: we will throw two dices and opposite player will select the result.
If you do not want to follow suggested path for blitz, left click on buttonand then select another path - eventually square by square - before to finally select (right click) the opposite player. It's important to click on this button before to move if you do not click on an opposite player: if not, blitz will not be available, your action will be considered as an action move.

After right click on the opposite payer, dice(s) is (are) rolled:

You have to select the dice (here only one) or click on 'Team Re-Roll' - if available. Then eventually you'll have to select to follow or not the player, or to select a skill or not (like stab).
After that you select square where to push player (left click on a blue square):

If player has remaining move points, you can move it.

How to throw ball?

Select a player (left click). If player has not yet moved and has not yet the ball, click on button:
Then move on the ball (hoping to get it) with right click. If you pick it then put mouse over player with ball and you'll see:

The different colors correspond to the difficulty to pass the ball. Not possible to launch ball further than red squares.
If you move your cursor on a friendly unit and right click on it, an attempt to pass is done.
As for blitz, if you simply move the player with the ball without clicking on the 'pass' button, it will not be allowed to pass the ball - it's considered as a move action.

How to hand off the ball?

Same as for throwing, except you have to use button:

and that you need to be just next player you want to give the ball.

How to make a foul?

Same as blitzing, except you have to use button:

and move on a player on the ground. If you select a player (that has not yet moved) and right click on an opposite player on ground, the best path will be automatically chosen and foul will be done on player. Do not forget your unit can be excluded.

How to make a block?

Select a player next opposite players. As for blitz, you will see small 'red' or 'blue' squares to indicates number of dices for the block. Just right click on unit you want to block.

Notice that after selecting the player (here blue guy with white hair), you see the 'block' dices on player you can block, and all squares where you can move are in 'red' has you will have to dodge if you want to move. If you click on the 'block' button:

you do not see these 'red' square as your action is considered as a block action. Notice practically there is no really need to use the button, just right click on the opponent unit.

Post Match sequence

After the match you come back to the ranking table. Notice an AutoSave file has been created, in the folder 'Save' created in the directory where you have launched the game.

It will not be possible to play next match while all user teams have not upgraded their players (if needed) and select at least 11 players in the roster - with eventually the help of journeymen. To do that, select your team and click on 'View Selected Team'. Next each player that can be upgraded, you will have a button that will allow to upgrade it. You can also enroll free journeyman, or buy journeymen that have played last match. Notice there is no reason to keep some money in your treasury (and not in the bank) as for a user, it is not yet possible to buy inducements before the match.
Be careful before to buy/fire a player, once it's done, it's done...

Loading/Saving Tournament

This is possible when no match is running. Notice there is no save mechanism for a match you are currently playing. Like the 'AutoSave' file, save files are located in the folder 'Save' created in the directory where you have launched the game.

Missing functionalities

- Following skills are not implemented: Piling On, Pass Block, Multiple Block, Kick Off Return, Kick, Hail Mary Pass, Diving Tackle, Blood Lust, Animosity, Bombardier, Throw Team-Mate (and consequently Right Stuff and Always Hungry), Leap, Dump-Off
- Pre-match sequence: AI can do the selection, but not human player - wizard is not yet implemented at all
- Special play cards - it's not intended to implement this
- Mercenary - it's not intended to implement this

Before to improve current AI level, next step will be to add the missing skills - although the most important are implemented.