A controller comprising: a reception unit to receive an addition requesting frame for requesting addition of a new flow which is a new communication flow; a first search unit to perform, using a network-information database in which a schedule and a path of each existing flow which is an existing communication flow are registered, a first search for searching for a schedule and a path assignable to the new flow without the schedule and the path of each existing flow being changed, when the addition requesting frame is received; a second search unit to perform a second search for changing the schedule and the path of each existing flow and searching for the schedule and the path assignable to the new flow, using the network-information database, when the schedule and the path assignable to the new flow have not been found by the first search; and a response unit to transmit an addition responding frame for responding to the addition requesting frame; characterized in that the second search unit includes an inference unit, a set-of-paths selection unit, a set-of-schedules search unit and a learning unit; the inference unit is configured to calculate one or more sets of candidate paths and a reward for each set of candidate paths by computing a learned model, wherein the set of candidate paths is a set of a candidate path of the new flow and candidate paths of each existing flow; the set-of-paths selection unit is configured to determine whether or not there is an unselected set of candidate paths in the sets of candidate paths; if there is no unselected set of candidate paths, the second search unit is configured not to change the schedule and the path of each existing flow; if there is the unselected set of candidate paths, the set-of-paths selection unit is configured to select, as a subject set of paths, one unselected set of candidate paths from the sets of candidate paths in descending order of the reward; when the subject set of paths is the set of the path of the new flow and the path of each existing flow, the set-of-schedules search unit is configured to search for an applicable set of schedules which satisfies a search condition; the learning unit is configured to perform reinforcement learning on the learned model, treating the subject set of paths and the reward for the subject set of paths as input; the set-of-paths selection unit is configured to determine whether or not the applicable set of schedules has been found; and if the applicable set of schedules has been found, the applicable set of schedules has been found as the set of the schedule assignable to the new flow and a schedule assignable to each existing flow, and the subject set of paths has been found as the set of the path assignable to the new flow and a path assignable to each existing flow. a reception unit to receive an addition requesting frame for requesting addition of a new flow which is a new communication flow; a first search unit to perform, using a network-information database in which a schedule and a path of each existing flow which is an existing communication flow are registered, a first search for searching for a schedule and a path assignable to the new flow without the schedule and the path of each existing flow being changed, when the addition requesting frame is received; a second search unit to perform a second search for changing the schedule and the path of each existing flow and searching for the schedule and the path assignable to the new flow, using the network-information database, when the schedule and the path assignable to the new flow have not been found by the first search; and a response unit to transmit an addition responding frame for responding to the addition requesting frame; characterized in that the second search unit includes an inference unit, a set-of-paths selection unit, a set-of-schedules search unit and a learning unit; the inference unit is configured to calculate one or more sets of candidate paths and a reward for each set of candidate paths by computing a learned model, wherein the set of candidate paths is a set of a candidate path of the new flow and candidate paths of each existing flow; the set-of-paths selection unit is configured to determine whether or not there is an unselected set of candidate paths in the sets of candidate paths; if there is no unselected set of candidate paths, the second search unit is configured not to change the schedule and the path of each existing flow; if there is the unselected set of candidate paths, the set-of-paths selection unit is configured to select, as a subject set of paths, one unselected set of candidate paths from the sets of candidate paths in descending order of the reward; when the subject set of paths is the set of the path of the new flow and the path of each existing flow, the set-of-schedules search unit is configured to search for an applicable set of schedules which satisfies a search condition; the learning unit is configured to perform reinforcement learning on the learned model, treating the subject set of paths and the reward for the subject set of paths as input; the set-of-paths selection unit is configured to determine whether or not the applicable set of schedules has been found; and if the applicable set of schedules has been found, the applicable set of schedules has been found as the set of the schedule assignable to the new flow and a schedule assignable to each existing flow, and the subject set of paths has been found as the set of the path assignable to the new flow and a path assignable to each existing flow.