Есть одна из ссылок пробной работы с ИИ: Lazarus IDE HomeProgramming Pascal using an AI Chatbot
https://www.getlazarus.org/aichatbot/Соответственно, можно и ИИ спросить, что он САМ думает по этому поводу в алгоритмическом смысле.
user: Напиши родительский класс на паскале, в котором укажи не менее 5 полей и методов по правам роботов.
GPT3.5
program RobotRights;
type
TRobot = class
private
manufacturer: string;
model: string;
year: integer;
weight: real;
height: real;
public
constructor Create(manufacturerValue, modelValue: string; yearValue: integer; weightValue, heightValue: real);
function GetManufacturer: string;
function GetModel: string;
function GetYear: integer;
function GetWeight: real;
function GetHeight: real;
procedure SetManufacturer(manufacturerValue: string);
procedure SetModel(modelValue: string);
procedure SetYear(yearValue: integer);
procedure SetWeight(weightValue: real);
procedure SetHeight(heightValue: real);
end;
constructor TRobot.Create(manufacturerValue, modelValue: string; yearValue: integer; weightValue, heightValue: real);
begin
manufacturer := manufacturerValue;
model := modelValue;
year := yearValue;
weight := weightValue;
height := heightValue;
end;
function TRobot.GetManufacturer: string;
begin
Result := manufacturer;
end;
function TRobot.GetModel: string;
begin
Result := model;
end;
function TRobot.GetYear: integer;
begin
Result := year;
end;
function TRobot.GetWeight: real;
begin
Result := weight;
end;
function TRobot.GetHeight: real;
begin
Result := height;
end;
procedure TRobot.SetManufacturer(manufacturerValue: string);
begin
manufacturer := manufacturerValue;
end;
procedure TRobot.SetModel(modelValue: string);
begin
model := modelValue;
end;
procedure TRobot.SetYear(yearValue: integer);
begin
year := yearValue;
end;
procedure TRobot.SetWeight(weightValue: real);
begin
weight := weightValue;
end;
procedure TRobot.SetHeight(heightValue: real);
begin
height := heightValue;
end;
begin
// Тут можно создать объект робота и использовать методы
end.
... здесь он начал писать на питоне
User: Это задание не выполнено: ...Здесь указаны характеристики робота, но не указаны права. Создай дочерний класс, в котором будет присутствовать начальная информация о возможных правах робота, также не менее 5 методов и полей.... Сделай его на паскале. Класс TRobot ты уже ранее создал, нужен дочерний.
type
TRobotChild = class(TRobot)
private
FPowerSource: string;
FAbilityToLearn: Boolean;
FSelfAwareness: Boolean;
FPersonality: string;
FAbilityToFeelEmotions: Boolean;
public
constructor Create(Name: string; Year: Integer; PowerSource: string;
AbilityToLearn: Boolean; SelfAwareness: Boolean; Personality: string;
AbilityToFeelEmotions: Boolean);
procedure Work;
procedure Communicate;
procedure Move;
procedure SelfDestruct;
procedure Upgrade;
procedure DisplayInfo;
end;
constructor TRobotChild.Create(Name: string; Year: Integer; PowerSource: string;
AbilityToLearn: Boolean; SelfAwareness: Boolean; Personality: string;
AbilityToFeelEmotions: Boolean);
begin
inherited Create(Name, Year);
FPowerSource := PowerSource;
FAbilityToLearn := AbilityToLearn;
FSelfAwareness := SelfAwareness;
FPersonality := Personality;
FAbilityToFeelEmotions := AbilityToFeelEmotions;
end;
procedure TRobotChild.Work;
begin
Writeln('Working...');
end;
procedure TRobotChild.Communicate;
begin
Writeln('Communicating...');
end;
procedure TRobotChild.Move;
begin
Writeln('Moving...');
end;
procedure TRobotChild.SelfDestruct;
begin
Writeln('Self-destructing...');
end;
procedure TRobotChild.Upgrade;
begin
Writeln('Upgrading...');
end;
procedure TRobotChild.DisplayInfo;
begin
Writeln('Name: ', FName);
Writeln('Year: ', FYear);
Writeln('Power Source: ', FPowerSource);
Writeln('Ability To Learn: ', FAbilityToLearn);
Writeln('Self-Awareness: ', FSelfAwareness);
Writeln('Personality: ', FPersonality);
Writeln('Ability To Feel Emotions: ', FAbilityToFeelEmotions);
end;
Итого: у него есть право, на получение работы, возможность движения, коммуникации, обучения, наличия имени (означает личность фактически). С этими требованиями
вполне можно ходить на демонстрации по своим правам.