You are on page 1of 6

Cairo University

Faculty of Computers and


Artificial Intelligence

AI314
Autonomous Multiagent Systems
2nd Report

Greenhouse Monitoring &


Controlling Agent

NAME ID
ABDELRAHMAN KHALED 20180142
AMAL SHERIF 20180053
MAHMOUD HOSSAM 20180251
NYAVOR JEAN-PIERRE 20180448

Spring 2021
Table of Contents
Defining the Problem .............................................................................................................. 2
State Space Diagram ............................................................................................................... 3
Solving the Problem ................................................................................................................ 4
Solving Using DFS ................................................................................................................ 4
Solving using BFS ................................................................................................................. 5
Defining the Problem
Greenhouses are buildings used to grow out-of-season crops or to protect tender plants and
flowers by providing a special environment and conditions of temperature, also known as
microclimate. The job of the monitoring and controlling agent is to maintain this
microclimate by controlling its variables.
To be able to maintain microclimate variables the agent must monitor a set of factors:

• Inner greenhouse microclimate (soil and air temperature, relative humidity, carbon
dioxide CO2 concentrations, electrical conductivity and soil moisture)
• Outer climate (temperature, relative humidity, solar radiation, wind speed, wind
direction and rainfall rate)
• Actuators and equipment status (ex: vents and curtains position)
and to be able to control these variables the agent must be connected to a:

• Heating system (for temperature and humidity control)


• Ventilation and fogging system (for temperature, humidity, and CO2 control)
• Lighting and shading system (for Light intensity and solar radiation control)
• Irrigation and nutrition system (for soil composition and moisture control)
• CO2 injection system (for CO2 control)
As seen above, trying to change any of these microclimate variables using the available
systems may affect other variables, for instance if light intensity increases then temperature
will increase, our problem is to build and agent that can find the combination of actions to
be taken that will result in a microclimate that maximizes production and reduces costs.
Problem Formulation:

• Goal test: Checking whether the estimated measures of temperature and humidity
are within the required range.
• States: The state is determined by the previous actions that has been taken upon
each variable (Increased, Decreased, Maintained). The total number of states is 9
states.
• Initial State: Both variables are maintained as they are in the measurements at the
corresponding moment.
• Actions: Each state has 4 actions, increase temperature, decrease temperature,
increase humidity, decrease humidity.
• Transition model: each action would lead to a change in each environmental
variable. Changes are estimated for each action depending on the values of the
environmental variables.
• Path cost: Every action has a cost that is defined at the beginning depending on how
much resources it’s going to consume (i.e., electricity, time, etc.).
State Space Diagram
For simplicity, we assumed that our agent is only going to deal with temperature and
humidity. This is going to facilitate the abstraction of the model and will also reduce the
space state size. The state space includes 9 states after getting the measurements of the
variables at the corresponding moment.
Solving the Problem
Solving Using DFS
We can solve this problem using a DFS technique. We assume that after each action taken
our agent can estimate the effects of this action on the microclimate. Therefore, at each
state the agent can apply the goal test to check whether it had reached the optimal values
or not. The agent also saves the states it had reached in all the states to make sure it does
not check a state that has been already checked, and in case it did not find an optimal
solution, it can simply look up the nearest one to it among the solutions it has reached.
The agent will get the measurements of the variables at the corresponding moment. Then at
the first state it will maintain the variables as they are and apply the goal test. If it didn’t
pass the test it is going to continue going down the search tree and apply the goal test at
each state. The below diagram shows a part of the search tree and how the agent acts.

The complexity of this solution at the worst case (Agent had to go through all states before
it finds optimal solution) is O(bm) where b is the branching factor and m is the maximum
depth of search tree and the total number of iterations will be the number of states. The
space complexity is O(bm) where b is the branching factor and m is the maximum depth of
search tree. In our case the branching factor is 4 and maximum depth is going to be 3.
Solving using BFS
When applying the BFS technique on our problem, the agent is going to traverse in the
search tree layer wise by checking all the possible states that can be reached from the
current state. The same strategy used in DFS can be applied here, which is applying the goal
test at each state and terminate if the optimal solution was reached.
In contrast with DFS, BFS stores newly discovered nodes in a FIFO queue which in turn
increases the space complexity. The space complexity of BFS search is O(bd) where b is the
branching factor and d the depth of the shallowest solution. In our case it will be O(43).
The below diagram shows how the agent is going to explore solutions through the search
tree.

The complexity of BFS search is O(bd) where b is the branching factor and d the depth of the
shallowest solution. In our case the branching factor is 4 and the depth of the shallowest
solution is 3.

You might also like