A device for cooking rice, comprising: a first container for containing the rice and water; a first heater for heating the rice and water in the first container; a first unit for obtaining information related to the rice; a second unit for determining the amount of water to be used in the heating process according to said information; a regulator for, during the heating, regulating the amount of water in the first container, wherein the regulator comprises an adding unit for adding water into the first container and a drainer connected to the first container for draining at least a part of the water from the first container, wherein the heating process comprises different stages including at least one of the following: an amylose leaching-out stage, defined by a temperature range, in which range the leaching-out of the amylose is the main phenomenon; an amylose pasting stage, defined by a temperature range, in which range the pasting of the amylase is the main phenomenon; an amylopectin water absorption stage, defined by a temperature range, in which range the water absorption of the amylopectin is the main phenomenon; a boiling stage, defined by a temperature at which the water is boiled; and a keeping warm stage, in which the rice has been cooked and is heated to be kept warm; wherein the second unit is for determining the amount of water to be used in the different stages, wherein the regulator is for regulating the amount of water in the different stages, wherein when the amount of water in the first container used for the previous stage exceeds the amount of water determined for the current stage, the drainer is adapted to drain the water from the container so as to meet the determined amount of water; and wherein when the amount of water in the first container is less than the determined amount for the given stage, the adding unit is adapted to add water to the container during the given stage. a first container for containing the rice and water; a first heater for heating the rice and water in the first container; a first unit for obtaining information related to the rice; a second unit for determining the amount of water to be used in the heating process according to said information; a regulator for, during the heating, regulating the amount of water in the first container, wherein the regulator comprises an adding unit for adding water into the first container and a drainer connected to the first container for draining at least a part of the water from the first container, wherein the heating process comprises different stages including at least one of the following: an amylose leaching-out stage, defined by a temperature range, in which range the leaching-out of the amylose is the main phenomenon; an amylose pasting stage, defined by a temperature range, in which range the pasting of the amylase is the main phenomenon; an amylopectin water absorption stage, defined by a temperature range, in which range the water absorption of the amylopectin is the main phenomenon; a boiling stage, defined by a temperature at which the water is boiled; and a keeping warm stage, in which the rice has been cooked and is heated to be kept warm; wherein the second unit is for determining the amount of water to be used in the different stages, wherein the regulator is for regulating the amount of water in the different stages, wherein when the amount of water in the first container used for the previous stage exceeds the amount of water determined for the current stage, the drainer is adapted to drain the water from the container so as to meet the determined amount of water; and wherein when the amount of water in the first container is less than the determined amount for the given stage, the adding unit is adapted to add water to the container during the given stage. an amylose leaching-out stage, defined by a temperature range, in which range the leaching-out of the amylose is the main phenomenon; an amylose pasting stage, defined by a temperature range, in which range the pasting of the amylase is the main phenomenon; an amylopectin water absorption stage, defined by a temperature range, in which range the water absorption of the amylopectin is the main phenomenon; a boiling stage, defined by a temperature at which the water is boiled; and a keeping warm stage, in which the rice has been cooked and is heated to be kept warm; wherein the second unit is for determining the amount of water to be used in the different stages, wherein the regulator is for regulating the amount of water in the different stages, wherein when the amount of water in the first container used for the previous stage exceeds the amount of water determined for the current stage, the drainer is adapted to drain the water from the container so as to meet the determined amount of water; and wherein when the amount of water in the first container is less than the determined amount for the given stage, the adding unit is adapted to add water to the container during the given stage.