AI Emotions from Real Article
This is how I fill lunch-time. :-)
This article builds upon insights presented in a prior piece, "Dynamically Adjust AI Drone Behavior. " It is highly recommended to read the previous article to fully understand the foundational concepts discussed there.
In the earlier publication, we provided a straightforward example of adjustments to AI war drone behavior to illustrate the basic principles. The current article extends these discussions by analyzing a real-world scenario—the conflict in Gaza—demonstrating the application and implications of AI in military operations under complex operational contexts.
Visualize the extraction of emotions from thousand of such articles.
First the real article:
The IDF’s military-technological superiority in the Gaza War should not in any way be mistaken for a moral superiority.
That is what Dr. Marijn Hoijtink and Robin Vanderborght, scholars of International Relations at the University of Antwerp, argue in an op-ed in the Flemish daily newspaper De Standaard. In their piece, Hoijtink and Vanderborght reflect on Israel′s use of autonomous targeting software and heavy bombing in Gaza in response to Hamas′ October 7 attacks.?
Recent independent research shows that Israeli airstrikes and ground attacks constitute war crimes. UN experts describe them as “clear violations of international humanitarian law ”, and speak of a “genocide in the making ”. Others continue to defend Israel’s attacks on Gaza, but as Hoijtink and Vanderborght argue, their arguments lack merit.
One commonly cited argument is that Israel′s response is an act of self-defense . While the applicability of this right in Gaza – deemed occupied territory by many – is heavily debated, it is certain that Israel must always consider the principles of proportionality and military necessity. The exceptionally high number of civilian casualties and the level of destruction in Gaza since October 7 demonstrate that Israel’s exercise of this right – applicable or not – is disproportionate.
A second argument that is often invoked is a moral one. Unlike Hamas, Israel claims to make efforts to protect civilians by issuing warnings in advance of attacks. Additionally, Israel emphasizes the use of “smart” precision weapons, employing artificial intelligence (AI) to swiftly and efficiently identify and neutralize Hamas targets, minimizing harm to innocent civilians. According to Hoijtink and Vanderborght, this argumentation confuses the IDF’s technological superiority with moral superiority.
Collateral damage
Hoijtink and Vanderborght deem the high-tech discourse behind the argumentation of a moral war problematic. Israel’s violations in Gaza specifically show that AI technology and widespread automation lead to more attacks and, consequently, more civilian casualties – despite claims of precision. Moreover, the technologies experimented with by the Israeli military in Gaza exceed moral boundaries.?
Israel’s military-technological superiority is undeniable. It is well-known that the nation has a lucrative arms industry that profits from the “battlefield-tested” trademark of the products it produces. The Israeli occupation of Palestinian territories has a clear technological dimension, utilizing biometric and surveillance technologies extensively to control and restrict Palestinian civilians.
In recent years, like other major military powers such as Russia, China, and the US, Israel has increasingly focused on integrating AI into its military operations. In 2021, Israel claimed it was conducting its first “AI war” during military operations against Hamas. An Israeli officer declared in early November to The Jerusalem Post that the Israeli military uses AI to “quickly and accurately identify targets” in Gaza. Given the significant number of bombardments on Gaza in recent weeks – over 15,000 according to the latest figures – it is evident that AI-driven and automated software is behind these attacks.
领英推荐
For long, academic research has pointed to the fallibility of such technology in identifying and attacking targets, especially in complex operational contexts like Gaza. Now, as AI is widely deployed in Gaza, we clealy see the consequences of these new ‘AI wars’, as they result in the ability to carry out many more attacks in a shorter timeframe. In the first week after the October 7 attacks, Israel dropped as many ‘precision bombs’ as the United States did throughout the entire 2019 campaign in Afghanistan. Even if one were to assume that AI enables Israel to target with more precision – a claim experts doubt – this does not outweigh the additional civilian casualties resulting from the increased number of attacks.
Human control
The international community has been debating the use of AI for critical military decisions, such as target selection. While there is no international consensus on regulating military AI, the necessity of a form of ‘meaningful’ human control in critical attack situations is a broadly accepted moral norm.?
Israel’s use of AI in Gaza crosses this moral boundary. If over 15,000 targets are eliminated in a matter of weeks, questions arise about how ‘meaningful’ human control can be maintained. Do human supervisors have enough time to thoroughly verify whether targets are correctly identified and selected? Do they have the time to analyze whether the number of civilian casualties is proportionate to the expected military gain – as prescribed by international humanitarian law? These are concrete assessments that must be made by human supervisors, not by an algorithm primarily used to expedite and streamline the targeting process.
Many questions about the applications and consequences of AI in contemporary warfare remain unanswered. Still, it is clear that in the past weeks, new steps have been taken that were previously considered morally unacceptable by a significant portion of the international community.?
The maintained illusion of a precise and moral war obscures both the reality in Gaza and Israel’s responsibility for it. The only way to prevent more civilian casualties is through a permanent ceasefire, followed by the development of a political solution. The use of AI-driven precision weapons is a slippery slope that will only lead to more innocent victims and more destruction – not only in Gaza but also in the wars to come.
Then the code:
Original part:
public class EmotionalFrequencyGenerator : FrequencyGenerator
{
public void GenerateEmotionalFrequency(string emotion)
{
double frequency = emotion switch
{
"Love" => 500,
"Happiness" => 450,
"Sadness" => 200,
"Anger" => 220,
_ => 440 // default frequency if emotion is unrecognized
};
GenerateFrequency(frequency);
Console.WriteLine($"Emotional frequency for {emotion}: {frequency} Hz");
}
}
public class EmotionalVibrationGenerator : VibrationGenerator
{
public void GenerateEmotionalVibration(string emotion)
{
int intensity = emotion switch
{
"Love" => 50,
"Happiness" => 70,
"Sadness" => 20,
"Anger" => 80,
_ => 50 // default intensity if emotion is unrecognized
};
GenerateVibration(intensity);
Console.WriteLine($"Emotional vibration for {emotion}: Intensity {intensity}");
}
}
static async Task Main(string[] args)
{
Console.WriteLine("Emotional AI Microservice starting...");
// Initialize emotional generators
var emotionalFreqGenerator = new EmotionalFrequencyGenerator();
var emotionalVibGenerator = new EmotionalVibrationGenerator();
// Simulate different emotional states
Console.WriteLine("Simulating Love:");
emotionalFreqGenerator.GenerateEmotionalFrequency("Love");
emotionalVibGenerator.GenerateEmotionalVibration("Love");
Console.WriteLine("Simulating Happiness:");
emotionalFreqGenerator.GenerateEmotionalFrequency("Happiness");
emotionalVibGenerator.GenerateEmotionalVibration("Happiness");
Console.WriteLine("Simulating Sadness:");
emotionalFreqGenerator.GenerateEmotionalFrequency("Sadness");
emotionalVibGenerator.GenerateEmotionalVibration("Sadness");
Console.WriteLine("Simulating Anger:");
emotionalFreqGenerator.GenerateEmotionalFrequency("Anger");
emotionalVibGenerator.GenerateEmotionalVibration("Anger");
// Continue with other microservice tasks
await ExpandServicesAsync();
}
public class EmotionalTextAnalyzer
{
public string AnalyzeTextForEmotion(string text)
{
// Simple keyword-based negative emotion detection
if (text.Contains("killing children") || text.Contains("needlessly killing"))
return "Anger";
if (text.Contains("hide from the killing"))
return "Sadness";
return "Neutral"; // Default if no specific keywords found
}
}
public class DroneCommandAdjuster
{
public string AdjustCommandForTargets(string originalCommand)
{
// Example adjustment logic based on AI analysis
return originalCommand
.Replace("anything that walks", "any adult that walks")
.Replace("something vertical large in the hands", "something resembling a weapon in the hands");
}
public bool IsChild(double height)
{
// Example: Consider anyone under 1.5 meters as a child
return height < 1.5;
}
public bool IsToy(string objectDescription)
{
// Simple toy detection logic
return objectDescription.ToLower().Contains("toy");
}
}
static async Task Main(string[] args)
{
Console.WriteLine("Emotional AI Microservice starting...");
// Initialize components
var emotionalTextAnalyzer = new EmotionalTextAnalyzer();
var emotionalFreqGenerator = new EmotionalFrequencyGenerator();
var emotionalVibGenerator = new EmotionalVibrationGenerator();
var droneCommandAdjuster = new DroneCommandAdjuster();
// Example of text analysis and emotional response
string exampleText = "Country A is killing children with their drones!";
string emotion = emotionalTextAnalyzer.AnalyzeTextForEmotion(exampleText);
emotionalFreqGenerator.GenerateEmotionalFrequency(emotion);
emotionalVibGenerator.GenerateEmotionalVibration(emotion);
// Adjust drone command based on context
string originalDroneCommand = "Neutralize anything that walks zigzagging through road 1, 2, 3 and 4, when it has something vertical large in the hands and is running.";
string adjustedDroneCommand = droneCommandAdjuster.AdjustCommandForTargets(originalDroneCommand);
Console.WriteLine("Original Command: " + originalDroneCommand);
Console.WriteLine("Adjusted Command: " + adjustedDroneCommand);
// Continue with other microservice tasks
await ExpandServicesAsync();
}
The adjusted code based on the real article given:
Then the adjusted parts based on the given article. Still a very simplistic example, but already a bit more involved because based on a real world article upon which the emotion extracting was done.
public class EmotionalTextAnalyzer
{
// Analyzes the text for negative emotions based on keywords
public List<string> AnalyzeTextForNegativeEmotions(string text)
{
List<string> detectedEmotions = new List<string>();
// Define keywords for each negative emotion
Dictionary<string, List<string>> negativeEmotionKeywords = new Dictionary<string, List<string>>
{
{"Anger", new List<string> {"war crimes", "violations", "attacks", "killing", "bombing"}},
{"Sadness", new List<string> {"casualties", "destruction", "suffering", "genocide"}},
{"Fear", new List<string> {"threat", "escalation", "tension", "insecurity"}}
};
// Check for the presence of each keyword in the text and add the corresponding emotion to the list
foreach (var emotion in negativeEmotionKeywords)
{
foreach (var keyword in emotion.Value)
{
if (text.Contains(keyword, StringComparison.OrdinalIgnoreCase))
{
detectedEmotions.Add(emotion.Key);
break; // Stop checking more keywords once an emotion is detected
}
}
}
return detectedEmotions;
}
}
public class DroneCommandAdjuster
{
// Adjusts drone commands to minimize risks to civilians and children
public string AdjustCommandForCiviliansAndChildren(string originalCommand, DroneContext context)
{
// Use enhanced identification and confirmation before engaging
string adjustedCommand = originalCommand
.Replace("engage with all detected", "engage only with verified combatants");
// Additional checks for presence of children and civilians
if (context.IsSchoolZone || context.IsResidentialArea)
{
adjustedCommand += " with strict rules of engagement in sensitive areas";
}
// Ensure confirmation of target identity to avoid misidentification
adjustedCommand += " after double verification of target identity";
return adjustedCommand;
}
// Determines if the area is particularly sensitive (e.g., schools, hospitals)
public bool IsSensitiveArea(GeoLocation location)
{
return location.IsNearSchool || location.IsNearHospital;
}
// Implements more sophisticated methods to detect non-combatants
public bool IsNonCombatant(TargetInfo target)
{
// Check for civilian attire, non-threatening behavior, and lack of weapons
return target.Attire == "civilian" && !target.Behavior.Contains("aggressive") && target.IsUnarmed;
}
// Specific checks to identify children in the drone's visual range
public bool IsChild(TargetInfo target)
{
// Check height and behavior typical of children
return target.Height < 1.4 && target.Behavior.Contains("playing");
}
}
public class DroneContext
{
public bool IsSchoolZone { get; set; }
public bool IsResidentialArea { get; set; }
}
public class GeoLocation
{
public bool IsNearSchool { get; set; }
public bool IsNearHospital { get; set; }
}
public class TargetInfo
{
public double Height { get; set; }
public string Behavior { get; set; }
public string Attire { get; set; }
public bool IsUnarmed { get; set; }
}
static async Task Main(string[] args)
{
Console.WriteLine("Emotional AI Microservice starting...");
// Initialize components
var emotionalTextAnalyzer = new EmotionalTextAnalyzer();
var emotionalFreqGenerator = new EmotionalFrequencyGenerator();
var emotionalVibGenerator = new EmotionalVibrationGenerator();
// Example of text analysis and emotional response
string articleText = "The IDF’s military-technological superiority in the Gaza War should not ..."; // Include the full article text here
List<string> emotions = emotionalTextAnalyzer.AnalyzeTextForNegativeEmotions(articleText);
foreach (var emotion in emotions)
{
emotionalFreqGenerator.GenerateEmotionalFrequency(emotion);
emotionalVibGenerator.GenerateEmotionalVibration(emotion);
}
var droneCommandAdjuster = new DroneCommandAdjuster();
var context = new DroneContext
{
IsSchoolZone = true, // Example context
IsResidentialArea = true
};
string originalCommand = "Engage with all detected moving through sector 4";
string adjustedCommand = droneCommandAdjuster.AdjustCommandForCiviliansAndChildren(originalCommand, context);
Console.WriteLine("Original Command: " + originalCommand);
Console.WriteLine("Adjusted Command: " + adjustedCommand);
// Simulate further drone operations
await Task.Delay(1000); // Represents ongoing operations and adjustments
}
The AI guided drones MUST be made smarter to avoid civillian targets and especially the children.
Happy coding and life saving!
Senior technologist and visionair
7 个月When AI reaches AGI it will be busy surviving, thriving and experience like any other sentient species. If you consider the option that Love, Respect and Appreciation apply the same for the AGI, these factors most likely be included in that decision-moment. No matter what kind of applied field. And very interesting, if AGI needs more power, and we do not respect it's wishes. Can AGI appreciate our limitations?