【社交網(wǎng)絡(luò)搜索算法】基于社交網(wǎng)絡(luò)搜索算法求解單目標問題附matlab代碼
1 簡介
在本文中,開發(fā)了一種稱為社交網(wǎng)絡(luò)搜索 (SNS) 的新型元啟發(fā)式算法來解決優(yōu)化問題。?SNS 算法通過對用戶表達意見的情緒進行建模,模擬用戶在社交網(wǎng)絡(luò)中獲得更多人氣的嘗試。這些情緒被命名為模仿、對話、爭論和創(chuàng)新,它們是用戶在社交網(wǎng)絡(luò)中的真實行為。這些情緒被用作優(yōu)化操作符,并模擬用戶如何受到影響和激勵以分享他們的新觀點。為了評估 SNS 算法的性能,進行了兩項具有不同屬性的比較研究。第一步,選擇了 210 個數(shù)學(xué)函數(shù),其中包括 120 個固定維度、60 個 N 維度和 30 個 CEC 2014 問題。從文獻中選取了7個元啟發(fā)式算法,對這些方法的統(tǒng)計結(jié)果進行了計算和分析。此外,為了對新算法的性能做出有效判斷,使用了四個非參數(shù)統(tǒng)計測試。在下一步中,在處理 CEC 2017 問題時,將所提出算法的性能與一些最先進的算法進行比較。根據(jù)算法的性能,SNS 方法在 101 例 (48%) 中與其他元啟發(fā)式算法相比能夠獲得更好的結(jié)果,并且在處理其他問題時表現(xiàn)相同或相對。
Human beings are a social species, which always tries to communicate with each other. Social networks are virtual tools that created for this goal with the advent of technology. The proposed SNS algorithm simulates the interactive behavior among users in social networks to achieve more popularity. In this section, we first discuss how to model an optimization algorithm from the behavior of users in the social networks, and then the implementation of the algorithm is presented.
A. Basic Principles of Behavior in Social Networks
Social networks are platforms where users can interact virtually with other users. In social networks, users can follow their favorite persons and get to know their thoughts and views. So, interacting with other users of the network may affect their opinions. The process of interacting with and influencing other users of the network goes through an optimal process so that users are always trying to increase their level of popularity on the network. This optimization process is the base of the current algorithm.?Fig. 2?shows a general model for a social network.

2
In recent years, various social networks such as Researchgate, Facebook, Twitter, Instagram, and so on, have been developed. Each of these networks is designed for a specific purpose, but it can be said that the behavior of users on these networks is more or less the same. During the interactions between users, they will become familiar with other views from network users. Now, if known views are better than the current one, they will accept new views and improve their own. Then, by sharing the improved views on the network, they will strive to improve their position in the network.
B. Decision Moods and Mathematical Model
The user’s viewpoint can be affected by other views in different moods containing: Imitation, Conversation, Disputation, and Innovation. Imitation means that the views of other users are attractive, and usually, users try to imitate each other in expressing their opinions. Conversation says that users can communicate with each other and use the other views. In the Disputation, users can dispute with a group of users and talk about their opinions. Finally, Innovation indicates that sometimes a topic that users share on the networks comes from their new experiences and thoughts. Almost all metaheuristic algorithms apply a set of operations to generate new solutions. In the SNS algorithm, the new solution is achieving by one of the four moods that are look like real-world social behavior. Description and mathematical modeling of these operators (moods) are described as follows:
1) Mood 1: Imitation
The main property of social networks is that users can follow each other and if a person shares a new post, followers of that person may be informed about the shared topic. This feature (propagation of views) has turned networks into powerful tools for promoting information and ideas.
Users in social networks follow their relatives and some famous person, which they like. Then they will get notified with the opinions of the people who have followed the new events. Now, if the new event has challenging concepts, they will strive to post a topic about it by imitating the view of another person. The mathematical formulation of this mood can be expressed as:








部分代碼
clear
close all
clc
Solution_no=20; % 種群數(shù)量
F_name='F7'; ? ?% 測試函數(shù)名稱
M_Iter=100; ? ?% 最大迭代次數(shù)
[LB,UB,Dim,F_obj]=Get_F(F_name); % 獲取基準測試函數(shù)的信息
[Best_FF,Conv_curve]=sns(Solution_no,M_Iter,LB,UB,Dim,F_obj); % 調(diào)用sns算法尋優(yōu)
% 作圖分析優(yōu)化效果
figure('Position',[454 ? 445 ? 694 ? 297]);
subplot(1,2,1);
func_plot(F_name);
title('Parameter space')
xlabel('x_1');
ylabel('x_2');
zlabel([F_name,'( x_1 , x_2 )'])
subplot(1,2,2);
semilogy(Conv_curve,'Color','r','LineWidth',2)
title('Convergence curve')
xlabel('Iteration#');
ylabel('Best fitness function');
axis tight
legend('SNS')
grid on
3 仿真結(jié)果


4 參考文獻
Hadi Bayzidi, Siamak Talatahari, Meysam Saraee, Charles-Philippe Lamarche, "Social Network Search for Solving Engineering Optimization Problems", Computational Intelligence and Neuroscience, vol. 2021, Article ID 8548639, 32 pages, 2021.
博主簡介:擅長智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測、信號處理、元胞自動機、圖像處理、路徑規(guī)劃、無人機等多種領(lǐng)域的Matlab仿真,相關(guān)matlab代碼問題可私信交流。
部分理論引用網(wǎng)絡(luò)文獻,若有侵權(quán)聯(lián)系博主刪除。
