Freeciv AI difficulty levels brekadown

Can't beat the AI? Is it too tame? Discuss the best strategies!
Post Reply
User avatar
Frostblade
Posts: 16
Joined: Thu Dec 04, 2025 1:17 pm

Freeciv AI difficulty levels brekadown

Post by Frostblade »

I couldn't find a single detailed source on the net about AI difficulty levels except for this thread with incomplete information and some explanation in the docs about what each level does.

So I've looked into code and carefuly documented this breakdown below that will hopefully help future readers:

---

# Freeciv AI difficulty levels

## Restricted

- Same as Novice
- In addition it may suffer additional ruleset-defined penalties

## Novice

- Research penalty -40%
- Expansion tendency 10% of normal (normal means relatively aggressive expansion)
- Chance to make mistakes 40%
- Doesn't build air units
- Doesn't build offensive diplomatic units
- Gets reduced bonuses from huts
- Prefers defensive buildings and avoids close diplomatic relations
- Naive at diplomacy
- Limits growth to match human players
- Believes its cities are always under threat
- Always offers cease-fire on first contact
- Doesn't bribe worker or city founder units
- Can see through fog of war
- Has complete map knowledge, including unexplored territory
- Limits the distance to search for threatening enemy units

## Easy

- Expansion tendency 10% of normal
- Chance to make mistakes 30%
- Doesn't build air units
- Doesn't build offensive diplomatic units
- Gets reduced bonuses from huts
- Prefers defensive buildings and avoids close diplomatic relations
- Naive at diplomacy
- Limits growth to match human players
- Always offers cease-fire on first contact
- Doesn't bribe worker or city founder units
- Can change city production type without penalty
- Can see through fog of war
- Has complete map knowledge, including unexplored territory
- Limits the distance to search for threatening enemy units

## Normal

- Doesn't build offensive diplomatic units
- Can skip anarchy during revolution
- Always offers cease-fire on first contact
- Doesn't bribe worker or city founder units
- Can change city production type without penalty
- Can see through fog of war
- Has complete map knowledge, including unexplored territory

## Hard

- Can target units and cities in unseen or unexplored territory
- Knows the location of huts in unexplored territory
- Can skip anarchy during revolution
- Can change city production type without penalty
- Can see through fog of war
- Has complete map knowledge, including unexplored territory

## Cheating

- Same as hard
- On top of hard, it uses ruleset defined extra bonuses such as science, production, food and happiness boosts etc.

----

Note if you want difficulty as close to fair play 'true' normal as possible (no bonuses, no maluses), you can configure it "ai/difficulty.c" under "Normal" case as follows, and recompile the game.


## True Normal / Fair play

- Will build offensive diplomatic units (if H_DIPLOMAT is not present)
- Can not skip anarchy during revolution (if H_REVOLUTION is present)
- Does not offer cease-fire on first contact (if H_CEASEFIRE is absent)
- Will bribe worker or city founder units (if H_NOBRIBE_WF is absent)
- Can not change city production type without penalty (if H_PRODCHGPEN is present)
- Can see through fog of war (if H_FOG is absent)
- Has complete map knowledge, including unexplored territory (if H_MAP is absent)

Absence of other options means no bonuses and no maluses are left.

I intentionally left H_FOG and H_MAP absent because this may set back the AI too much, but you can enable them for 100% fair play.
You may want to do this e.g. to see how good or bad AI is when faced same conditions as human player.
cazfi
Elite
Posts: 3574
Joined: Tue Jan 29, 2013 6:54 pm

Re: Freeciv AI difficulty levels brekadown

Post by cazfi »

Try server command "help <ai level>" to get information about the difficulty levels of the exact freeciv version you're running.

Code: Select all

> help hard
Command: hard  -  Set one or all AI players to 'Hard'.
Synopsis: hard
          hard <player-name>
Level: ctrl
Description:
  With no arguments, sets all AI players to skill level 'Hard', and sets
  the default level for any new AI players to 'Hard'. With an argument,
  sets the skill level for the specified player only.
  
  This skill level's features include the following. (Some rulesets may
  define extra level-specific behavior.)
  
  Can target units and cities in unseen or unexplored territory.
  Knows the location of huts in unexplored territory.
  Can see through fog of war.
  Has complete map knowledge, including unexplored territory.
  Can skip anarchy during revolution.
  Can change city production type without penalty.
User avatar
Frostblade
Posts: 16
Joined: Thu Dec 04, 2025 1:17 pm

Re: Freeciv AI difficulty levels brekadown

Post by Frostblade »

Cool, this is the most precise way to get difficulty.

I've run /help novice and it says "Has erratic decision-making", but I find "Chance to make mistakes 40%" more informative.
Dino the Dinosore
Hardened
Posts: 249
Joined: Sun Dec 31, 2017 3:41 am

Re: Freeciv AI difficulty levels brekadown

Post by Dino the Dinosore »

Frostblade - if you feel up to opening an issue and making a patch, you could improve what the server command "help <ai level>" outputs. Looks to me like the source file is ai/handicaps.c
User avatar
Frostblade
Posts: 16
Joined: Thu Dec 04, 2025 1:17 pm

Re: Freeciv AI difficulty levels brekadown

Post by Frostblade »

Dino the Dinosore wrote: ↑Mon Nov 30, 2026 2:35 am Looks to me like the source file is ai/handicaps.c
To me it doesn't look right that they are all called handicaps, handicap means malus - the opposite of a bonus.
However some of the handicaps are in fact not handicaps but bonuses. (treated as inverted handicaps)
e.g. complete map visibility regardless if explored is not a handicap but a bonus.

I think bonuses and handicaps should be separated, but that's only my opinion, it doesn't change anything in particular other than making it clearer.
Dino the Dinosore wrote: ↑Mon Nov 30, 2026 2:35 am you could improve what the server command "help <ai level>" outputs.
I'll consider it, but there is other stuff worth more attention.
Post Reply