A-level Computing/AQA/Paper 1/Skeleton program/2026
Ant Simulation This is for the 2026 AQA A-level Computer Science Specification (7517).
This is where suggestions can be made about what some of the questions might be and how we can solve them.
Please be respectful and do not vandalise the page, as this may affect students' preparation for exams!
Section C Predictions
The 2026 paper 1 will contain four questions worth 2 marks each.
Predictions:
Mark distribution comparison
Mark distribution for this year:
- The 2026 paper 1 contains 4 questions: a 5 mark, an 8 mark, and two 12 mark questions.
Mark distribution for previous years:
- The 2025 paper 1 contains 4 questions: a 5 mark, an 8 mark, a 12 mark, and a 14 mark question(s).
- The 2024 paper 1 contained 4 questions: a 5 mark, a 6 mark question, a 14 mark question and one 14 mark question(s).
- The 2023 paper 1 contained 4 questions: a 5 mark, a 9 mark, a 10 mark question, and a 13 mark question(s).
- The 2022 paper 1 contained 4 questions: a 5 mark, a 9 mark, an 11 mark, and a 13 mark question(s).
- The 2021 paper 1 contained 4 questions: a 6 mark, an 8 mark, a 9 mark, and a 14 mark question(s).
- The 2020 paper 1 contained 4 questions: a 6 mark, an 8 mark, an 11 mark and a 12 mark question(s).
- The 2019 paper 1 contained 4 questions: a 5 mark, an 8 mark, a 9 mark, and a 13 mark question(s).
- The 2018 paper 1 contained 5 questions: a 2 mark, a 5 mark, two 9 mark, and a 12 mark question(s).
- The 2017 paper 1 contained 5 questions: a 5 mark question, three 6 mark questions, and one 2 mark question.
Please note the marks above include the screen capture(s), so the likely marks for the coding will be 2-3 marks lower.
Section D Predictions
Current questions are speculation by contributors to this page.
Simulation 1
Fix the Quit button
C#:
DO - Coombe Wood School - South Croydon
Line 71 - After the get choice
//start of change
if (Choice == "9")
{
Environment.Exit(0);
}
Console.ReadLine();
//End of Change
Fix the error with 1,4 being entered
C#:
RT - Coombe Wood School - South Croydon
static void Main()
{
List<int> SimulationParameters = new List<int>();
Console.Write("Enter simulation number: ");
string SimNo = Console.ReadLine();
switch (SimNo)
{
case "1":
SimulationParameters = new List<int> { 1, 5, 5, 500, 3, 5, 1000, 50 };
break;
case "2":
SimulationParameters = new List<int> { 1, 5, 5, 500, 3, 5, 1000, 100 };
break;
case "3":
SimulationParameters = new List<int> { 1, 10, 10, 500, 3, 9, 1000, 25 };
break;
case "4":
SimulationParameters = new List<int> { 2, 10, 10, 500, 3, 6, 1000, 25 };
break;
//start of change
default:
Console.WriteLine("Enter a number between 1-4");
Main();
break;
}
;
//End of Change
Loop the question if a wrong grid size comes up
C#:
Coombe Wood School - South Croydon Around line 60:
case "3":
int Row = 0, Column = 0;
//START OF CHANGE: loop until valid cell is entered
do
{
GetCellReference(ref Row, ref Column);
if (Row < 1 || Row > ThisSimulation.NumberOfRows || Column < 1 || Column > ThisSimulation.NumberOfColumns)
{
Console.WriteLine($"Invalid cell! Please enter a row between 1-{ThisSimulation.NumberOfRows} and a column between 1-{ThisSimulation.NumberOfColumns}.");
}
else
{b
break;
}
} while (true);
//END OF CHANGE
//End of Change
Around line 130:
//START OF CHANGE
public int NumberOfRows, NumberOfColumns;
protected int StartingFoodInNest, StartingNumberOfFoodCells, StartingNumberOfNests;
//END OF CHANGE
Add an end to the game when all ants are dead
C#:
Coombe Wood School - South Croydon Around line 60:
case "3":
int Row = 0, Column = 0;
//start of change
Add to end of Advance stage:
if (Ants.Count == 0)
{
Console.WriteLine("All ants are dead. Game Over!");
Console.ReadKey();
Environment.Exit(0);
}
//END OF CHANGE
Add an error message when a blank grid space is entered and ask the user to retry
C#:
Coombe Wood School - South Croydon
//START OF CHANGE "Add an error message when a blank grid space is entered"
Console.WriteLine();
while (true)
{
Console.Write("Enter row number: ");
string rowInput = Console.ReadLine();
if (string.IsNullOrWhiteSpace(rowInput) || !int.TryParse(rowInput, out Row) || Row <= 0)
{
Console.WriteLine("Invalid row input. Please enter a valid positive number.");
continue;
}
Console.Write("Enter column number: ");
string colInput = Console.ReadLine();
if (string.IsNullOrWhiteSpace(colInput) || !int.TryParse(colInput, out Column) || Column <= 0)
{
Console.WriteLine("Invalid column input. Please enter a valid positive number.");
continue;
}
// If both inputs are valid
break;
}
Console.WriteLine();
}
//END OF CHANGE "Add an error message when a blank grid space is entered"
</syntaxhighlight>
Fix the crash that happens when Inspecting cell not in the range
C#:
Coombe Wood School - South Croydon
public string GetCellDetails(int Row, int Column)
{
//START OF CHANGE
if (Row < 1 || Row > NumberOfRows || Column < 1 || Column > NumberOfColumns)
{
return $"Cell ({Row}, {Column}) is out of range.";
}
// END OF CHANGE
Add this to the start of the GetCellDetails
</syntaxhighlight>
Simulation 2
Simulation 3
Simulation 4
General Questions
Add a way at the start explaining what each simulation does cos it just throws u in telling u to select one
C#:
Coombe Wood School - South Croydon // START OF CHANGE - below the FIRST SimNo SWITCH switch (SimNo) {
case "1":
Console.WriteLine("This is simulation 1, a 5x5 grid with one nest and three food sources when started. Pheromone strength: 1000 with decay 50");
break;
case "2":
Console.WriteLine("This is simulation 2, a 5x5 grid with one nest and three food sources when started. Pheromone strength: 1000 with decay 100");
break;
case "3":
Console.WriteLine("This is simulation 3, a 10x10 grid with one nest and three food sources when started. Pheromone strength: 1000 with decay 25");
break;
case "4":
Console.WriteLine("This is simulation 4, a 10x10 grid with two nests and three food sources when started. Pheromone strength: 1000 with decay 25");
break;
} // END OF CHANGE </syntaxhighlight>
Add another simulation
C#:
Coombe Wood School - South Croydon Around line 36 //START OF CHANGE case "5":
SimulationParameters = new List<int> {3, 15,15,500 , 3, 4, 1000, 25};
break;
//END OF CHANGE //YOU CAN CHANGE ANY OF THE NUMBERS IN THE LIST TO MAKE YOUR OWN SIMULATION </syntaxhighlight>
Make the grid be displayed as an actual grid
C#:
DA - Coombe Wood School - South Croydon //You need to add all 3 parts for it to work add the red bits only, the black is just to see where //Around line 67
DisplayMenu(); Choice = GetChoice(); switch (Choice) {
case "1":
Console.WriteLine(ThisSimulation.GetDetails());
break;
case "2":
int StartRow = 0, StartColumn = 0, EndRow = 0, EndColumn = 0;
GetCellReference(ref StartRow, ref StartColumn);
GetCellReference(ref EndRow, ref EndColumn);
Console.WriteLine(ThisSimulation.GetAreaDetails(StartRow, StartColumn, EndRow, EndColumn));
break;
case "3":
int Row = 0, Column = 0;
GetCellReference(ref Row, ref Column);
Console.WriteLine(ThisSimulation.GetCellDetails(Row, Column));
break;
case "4":
ThisSimulation.AdvanceStage(1);
Console.WriteLine($"Simulation moved on one stage{Environment.NewLine}");
break;
case "5":
Console.Write("Enter number of stages to advance by: ");
int NumberOfStages = Convert.ToInt32(Console.ReadLine());
ThisSimulation.AdvanceStage(NumberOfStages);
Console.WriteLine($"Simulation moved on {NumberOfStages} stages{Environment.NewLine}");
break;
//start of change
case "7":
ThisSimulation.DisplayGrid();
Break;
//end of change
//Around line 125 static void DisplayMenu() {
Console.WriteLine();
Console.WriteLine("1. Display overall details");
Console.WriteLine("2. Display area details");
Console.WriteLine("3. Inspect cell");
Console.WriteLine("4. Advance one stage");
Console.WriteLine("5. Advance X stages");
//start of change
Console.WriteLine("7. Display grid view");
//end of change Console.WriteLine("9. Quit");
Console.WriteLine();
Console.Write("> ");
} //After the getdetails string ends, put this outside the brackets
public void DisplayGrid()
{
for (int row = 1; row <= NumberOfRows; row++)
{
for (int col = 1; col <= NumberOfColumns; col++)
{
Cell currentCell = Grid[GetIndex(row, col)];
string cellDisplay = "[";
bool hasContent = false;
if (GetNestInCell(currentCell) != null)
{
cellDisplay += "N";
hasContent = true;
}
if (GetNumberOfAntsInCell(currentCell) > 0)
{
cellDisplay += "A";
hasContent = true;
}
if (currentCell.GetAmountOfFood() > 0)
{
cellDisplay += "F";
hasContent = true;
}
if (GetNumberOfPheromonesInCell(currentCell) > 0)
{
cellDisplay += "P";
hasContent = true;
}
if (!hasContent)
{
cellDisplay += " ";
}
cellDisplay += "]";
Console.Write(cellDisplay + " ");
}
Console.WriteLine();
}
}
//END OF CHANGE </syntaxhighlight>
Add error exceptions for certain errors like putting in a number too big for advancing stages so it doesn't just close or break
C#:
JD - Coombe Wood School - South Croydon Changes takes place in the Main void, in the fifth switch case -
//START OF CHANGE
case "5":
Console.WriteLine("Enter in number of stages to advance, it must be under 20 digits");
string NumberOfStages = (Console.ReadLine());
if (NumberOfStages.Length > 19 || !NumberOfStages.All(char.IsDigit))
{
Console.WriteLine("Number entered is too large, or you have entered in letters. going back to main menu");
break;
}
ulong NumberOfStagesULong = (ulong)Convert.ToInt64(NumberOfStages);
ThisSimulation.AdvanceStage((int)NumberOfStagesULong);
// END OF CHANGE
Console.WriteLine($"Simulation moved on {NumberOfStages} stages{Environment.NewLine}");
break;
</syntaxhighlight>
End game when here is no food left
C#:
break;
</syntaxhighlight>